Package org.cristalise.kernel.utils
Class LocalObjectLoader
java.lang.Object
org.cristalise.kernel.utils.LocalObjectLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegerderiveVersionNumber(Object value) Converts Object to an Integer representing a version number.static ActivityDefRetrieves a named version of ActivityDef from the databasestatic ActivityDefgetActDef(String actName, int actVersion, TransactionKey transactionKey) static ImportAgentgetAgentDesc(String name, int version) static ImportAgentgetAgentDesc(String name, int version, TransactionKey transactionKey) static CompositeActivityDefgetCompActDef(String actName, int actVersion) Retrieves a named version of CompositeActivityDef from the databasestatic CompositeActivityDefgetCompActDef(String actName, int actVersion, TransactionKey transactionKey) static DomainContextgetDomainContext(String name, int version) static DomainContextgetDomainContext(String name, int version, TransactionKey transactionKey) static ActivityDefgetElemActDef(String actName, int actVersion) Retrieves a named version of ActivityDef from the databasestatic ActivityDefgetElemActDef(String actName, int actVersion, TransactionKey transactionKey) static ImportItemgetItemDesc(String name, int version) static ImportItemgetItemDesc(String name, int version, TransactionKey transactionKey) static PropertyDescriptionListgetPropertyDescriptionList(String name, int version) static PropertyDescriptionListgetPropertyDescriptionList(String name, int version, TransactionKey transactionKey) static PropertyDescriptionListgetPropertyDescriptionList(CastorHashMap properties) static PropertyDescriptionListgetPropertyDescriptionList(CastorHashMap properties, TransactionKey transactionKey) static QueryRetrieves a named version of a query from the databasestatic QuerygetQuery(String queryName, int queryVersion, TransactionKey transactionKey) static QuerygetQuery(CastorHashMap properties) Retrieves a query from the database finding data in the Vertex propertiesstatic QuerygetQuery(CastorHashMap properties, TransactionKey transactionKey) static ImportRolegetRoleDesc(String name, int version) static ImportRolegetRoleDesc(String name, int version, TransactionKey transactionKey) static SchemaRetrieves a named version of a schema from the databasestatic SchemagetSchema(String schemaName, int schemaVersion, TransactionKey transactionKey) static SchemagetSchema(CastorHashMap properties) Retrieves a schema from the database finding data in the Vertex propertiesstatic SchemagetSchema(CastorHashMap properties, TransactionKey transactionKey) static ScriptRetrieves a named version of a script from the databasestatic ScriptgetScript(String scriptName, int scriptVersion, TransactionKey transactionKey) static ScriptgetScript(CastorHashMap properties) Retrieves a script from the database finding data in the Vertex propertiesstatic ScriptgetScript(CastorHashMap properties, TransactionKey transactionKey) static StateMachinegetStateMachine(String smName, int smVersion) Retrieves a named version of a StateMachine from the databasestatic StateMachinegetStateMachine(String smName, int smVersion, TransactionKey transactionKey) static StateMachinegetStateMachine(CastorHashMap properties) static StateMachinegetStateMachine(CastorHashMap properties, TransactionKey transactionKey)
-
Constructor Details
-
LocalObjectLoader
public LocalObjectLoader()
-
-
Method Details
-
getScript
public static Script getScript(String scriptName, int scriptVersion) throws ObjectNotFoundException, InvalidDataException Retrieves a named version of a script from the database- Parameters:
scriptName- - script namescriptVersion- - integer script version- Returns:
- Script
- Throws:
ObjectNotFoundException- - When script or version does not existInvalidDataException- - When the stored script data was invalid
-
getScript
public static Script getScript(String scriptName, int scriptVersion, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getScript
public static Script getScript(CastorHashMap properties) throws InvalidDataException, ObjectNotFoundException Retrieves a script from the database finding data in the Vertex properties- Parameters:
properties- vertex properties- Returns:
- Script
- Throws:
InvalidDataExceptionObjectNotFoundException
-
getScript
public static Script getScript(CastorHashMap properties, TransactionKey transactionKey) throws InvalidDataException, ObjectNotFoundException -
getQuery
public static Query getQuery(String queryName, int queryVersion) throws ObjectNotFoundException, InvalidDataException Retrieves a named version of a query from the database- Parameters:
queryName- - query namequeryVersion- - integer query version- Returns:
- Query
- Throws:
ObjectNotFoundException- - When query or version does not existInvalidDataException- - When the stored query data was invalid
-
getQuery
public static Query getQuery(String queryName, int queryVersion, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getQuery
public static Query getQuery(CastorHashMap properties) throws InvalidDataException, ObjectNotFoundException Retrieves a query from the database finding data in the Vertex properties- Parameters:
properties- vertex properties- Returns:
- Query
- Throws:
InvalidDataExceptionObjectNotFoundException
-
getQuery
public static Query getQuery(CastorHashMap properties, TransactionKey transactionKey) throws InvalidDataException, ObjectNotFoundException -
getSchema
public static Schema getSchema(String schemaName, int schemaVersion) throws ObjectNotFoundException, InvalidDataException Retrieves a named version of a schema from the database- Parameters:
schemaName- - schema nameschemaVersion- - integer schema version- Returns:
- Schema
- Throws:
ObjectNotFoundException- - When schema or version does not existInvalidDataException- - When the stored schema data was invalid
-
getSchema
public static Schema getSchema(String schemaName, int schemaVersion, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getSchema
public static Schema getSchema(CastorHashMap properties) throws InvalidDataException, ObjectNotFoundException Retrieves a schema from the database finding data in the Vertex properties- Parameters:
properties- vertex properties- Returns:
- Schema
- Throws:
InvalidDataExceptionObjectNotFoundException
-
getSchema
public static Schema getSchema(CastorHashMap properties, TransactionKey transactionKey) throws InvalidDataException, ObjectNotFoundException -
getActDef
public static ActivityDef getActDef(String actName, int actVersion) throws ObjectNotFoundException, InvalidDataException Retrieves a named version of ActivityDef from the database- Parameters:
actName- - activity nameactVersion- - integer activity version- Returns:
- ActivityDef
- Throws:
ObjectNotFoundException- - When activity or version does not existInvalidDataException- - When the stored script data was invalid
-
getActDef
public static ActivityDef getActDef(String actName, int actVersion, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getCompActDef
public static CompositeActivityDef getCompActDef(String actName, int actVersion) throws ObjectNotFoundException, InvalidDataException Retrieves a named version of CompositeActivityDef from the database- Parameters:
actName- - activity nameactVersion- - integer activity version- Returns:
- ActivityDef
- Throws:
ObjectNotFoundException- - When activity or version does not existInvalidDataException- - When the stored script data was invalid
-
getCompActDef
public static CompositeActivityDef getCompActDef(String actName, int actVersion, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getElemActDef
public static ActivityDef getElemActDef(String actName, int actVersion) throws ObjectNotFoundException, InvalidDataException Retrieves a named version of ActivityDef from the database- Parameters:
actName- - activity nameactVersion- - integer activity version- Returns:
- ActivityDef
- Throws:
ObjectNotFoundException- - When activity or version does not existInvalidDataException- - When the stored script data was invalid
-
getElemActDef
public static ActivityDef getElemActDef(String actName, int actVersion, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getStateMachine
public static StateMachine getStateMachine(String smName, int smVersion) throws ObjectNotFoundException, InvalidDataException Retrieves a named version of a StateMachine from the database- Parameters:
smName- - state machine namesmVersion- - integer state machine version- Returns:
- StateMachine
- Throws:
ObjectNotFoundException- - When state machine or version does not existInvalidDataException- - When the stored state machine data was invalid
-
getStateMachine
public static StateMachine getStateMachine(String smName, int smVersion, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getStateMachine
public static StateMachine getStateMachine(CastorHashMap properties) throws InvalidDataException, ObjectNotFoundException - Parameters:
properties-- Returns:
- Throws:
InvalidDataExceptionObjectNotFoundException
-
getStateMachine
public static StateMachine getStateMachine(CastorHashMap properties, TransactionKey transactionKey) throws InvalidDataException, ObjectNotFoundException -
getPropertyDescriptionList
public static PropertyDescriptionList getPropertyDescriptionList(String name, int version) throws ObjectNotFoundException, InvalidDataException - Parameters:
name-version-- Returns:
- Throws:
ObjectNotFoundExceptionInvalidDataException
-
getPropertyDescriptionList
public static PropertyDescriptionList getPropertyDescriptionList(String name, int version, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getPropertyDescriptionList
public static PropertyDescriptionList getPropertyDescriptionList(CastorHashMap properties) throws InvalidDataException, ObjectNotFoundException - Parameters:
properties-- Returns:
- Throws:
InvalidDataExceptionObjectNotFoundException
-
getPropertyDescriptionList
public static PropertyDescriptionList getPropertyDescriptionList(CastorHashMap properties, TransactionKey transactionKey) throws InvalidDataException, ObjectNotFoundException -
getAgentDesc
public static ImportAgent getAgentDesc(String name, int version) throws ObjectNotFoundException, InvalidDataException -
getAgentDesc
public static ImportAgent getAgentDesc(String name, int version, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getItemDesc
public static ImportItem getItemDesc(String name, int version) throws ObjectNotFoundException, InvalidDataException -
getItemDesc
public static ImportItem getItemDesc(String name, int version, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getRoleDesc
public static ImportRole getRoleDesc(String name, int version) throws ObjectNotFoundException, InvalidDataException -
getRoleDesc
public static ImportRole getRoleDesc(String name, int version, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
getDomainContext
public static DomainContext getDomainContext(String name, int version) throws ObjectNotFoundException, InvalidDataException -
getDomainContext
public static DomainContext getDomainContext(String name, int version, TransactionKey transactionKey) throws ObjectNotFoundException, InvalidDataException -
deriveVersionNumber
Converts Object to an Integer representing a version number.- Parameters:
value- the Object containing a version number- Returns:
- the converted Version number. Set to null if value was null or-1
- Throws:
InvalidDataException
-