public class VirtualInstanceFactory extends HibernateFactory
VirtualInstance
Constructor and Description |
---|
VirtualInstanceFactory() |
Modifier and Type | Method and Description |
---|---|
void |
deleteVirtualInstanceOnly(VirtualInstance virtualInstance)
Deletes the virtual instance from the database.
|
java.util.Set |
findGuestsWithNonVirtHostByOrg(Org org)
Finds all registered guests, within a particular org, whose hosts do not have any
virtualization entitlements.
|
java.util.Set |
findGuestsWithoutAHostByOrg(Org org)
Finds all registered guests, within a particular org, who do not have a registered
host.
|
VirtualInstanceState |
getCrashedState()
Return the crashed state.
|
VirtualInstanceType |
getFullyVirtType()
Returns the fully-virt type.
|
static VirtualInstanceFactory |
getInstance()
Get instance of this factory.
|
protected org.apache.log4j.Logger |
getLogger()
Get the Logger for the derived class so log messages show up on the
correct class
|
VirtualInstanceType |
getParaVirtType()
Returns the para-virt type.
|
VirtualInstanceState |
getPausedState()
Returns the paused state.
|
VirtualInstanceState |
getRunningState()
Returns the running state.
|
VirtualInstanceState |
getStoppedState()
Returns the stopped state.
|
VirtualInstanceState |
getUnknownState()
Return the unknown state
|
boolean |
isOutdated(VirtualInstance guest)
Check if the given guest instance is outdated.
|
VirtualInstance |
lookupByGuestId(Org org,
java.lang.Long id)
Gets the virtual Instance for a given Sid for a guest
|
VirtualInstance |
lookupById(java.lang.Long id)
Retrieves the virtual instance with the specified ID.
|
void |
saveVirtualInstance(VirtualInstance virtualInstance)
Saves the virtual instance to the database.
|
addConfigurator, blobToByteArray, byteArrayToBlob, closeSession, closeSessionFactory, commitTransaction, createSessionFactory, createSessionFactory, executeCallableMode, executeSelectMode, getBlobContents, getByteArrayContents, getObject, getSession, initialize, inTransaction, isClosed, isInitialized, listObjectsByNamedQuery, listObjectsByNamedQuery, listObjectsByNamedQuery, lockObject, lookupObjectByNamedQuery, lookupObjectByNamedQuery, reload, removeObject, rollbackTransaction, saveObject, saveObject, stringToByteArray
protected org.apache.log4j.Logger getLogger()
HibernateFactory
getLogger
in class HibernateFactory
public static VirtualInstanceFactory getInstance()
public void saveVirtualInstance(VirtualInstance virtualInstance)
virtualInstance
- The virtual instance to savepublic VirtualInstance lookupByGuestId(Org org, java.lang.Long id)
id
- the system id of the guestorg
- the org to check againstpublic boolean isOutdated(VirtualInstance guest)
guest
- Virtual instance to check.public VirtualInstance lookupById(java.lang.Long id)
id
- The primary keynull
if no match
is found.public void deleteVirtualInstanceOnly(VirtualInstance virtualInstance)
virtualInstance
- The virtual instance to deletepublic java.util.Set findGuestsWithNonVirtHostByOrg(Org org)
org
- The org to search inGuestAndNonVirtHostView
public java.util.Set findGuestsWithoutAHostByOrg(Org org)
org
- The org to search inGuestAndNonVirtHostView
public VirtualInstanceType getParaVirtType()
public VirtualInstanceType getFullyVirtType()
public VirtualInstanceState getRunningState()
public VirtualInstanceState getStoppedState()
public VirtualInstanceState getPausedState()
public VirtualInstanceState getCrashedState()
public VirtualInstanceState getUnknownState()