public class ProfileFactory extends HibernateFactory
Modifier and Type | Field and Description |
---|---|
static ProfileType |
TYPE_NORMAL
The constant representing normal profile type.
|
static ProfileType |
TYPE_SYNC_PROFILE
The constant representing sync profile type.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List |
compatibleWithServer(Server server,
Org org)
Returns a list of Profiles which are compatible with the given server.
|
static Profile |
createProfile(ProfileType type)
Creates a new Profile
|
static Profile |
findByNameAndOrgId(java.lang.String name,
java.lang.Long orgid)
Returns a Profile whose name matches the given name and is in the
given org, or null if none found.
|
protected org.apache.log4j.Logger |
getLogger()
Get the Logger for the derived class so log messages show up on the
correct class
|
static Profile |
lookupByIdAndOrg(java.lang.Long id,
Org org)
Lookup a Profile by their id
|
static ProfileType |
lookupByLabel(java.lang.String name)
Get the statetype by name.
|
static int |
remove(Profile profile)
Deletes the profile.
|
static void |
save(Profile profile)
Store the profile.
|
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
public static final ProfileType TYPE_NORMAL
public static final ProfileType TYPE_SYNC_PROFILE
public static Profile createProfile(ProfileType type)
type
- Type of profile desired.TYPE_NORMAL
,
TYPE_SYNC_PROFILE
public static ProfileType lookupByLabel(java.lang.String name)
name
- Name of statetypepublic static Profile lookupByIdAndOrg(java.lang.Long id, Org org)
id
- the id to search fororg
- The org in which this profile should be.public static java.util.List compatibleWithServer(Server server, Org org)
server
- Server whose profiles we want.org
- Org ownerpublic static void save(Profile profile)
profile
- The object we are commiting.public static int remove(Profile profile)
profile
- The object we are deleting.protected org.apache.log4j.Logger getLogger()
getLogger
in class HibernateFactory
public static Profile findByNameAndOrgId(java.lang.String name, java.lang.Long orgid)
name
- Profile nameorgid
- OrgId which owns profile.