| java.lang.Object org.openharmonise.rm.metadata.AbstractPropertyInstance org.openharmonise.rm.metadata.ChildObjectPropertyInstance
All known Subclasses: org.openharmonise.rm.workflow.WorkflowPropertyInstance,
ChildObjectPropertyInstance | public class ChildObjectPropertyInstance extends AbstractPropertyInstance implements Publishable(Code) | | A concrete implementation of AbstractPropertyInstance to handle
property instances which contain AbstractChildObject values.
author: Michael Bell version: $Revision: 1.5 $ |
Method Summary | |
public void | addValue(AbstractChildObject child) Adds the given AbstractChildObject as a value to this
property instance. | public void | addValue(AbstractChildObject child, int nId) Adds the given AbstractChildObject as a value to this
property instance with the specified id. | public static String | constructDBTableName(Profile profile, String sTable) Returns the name of the property instance data base table
for holding AbstractChildObject value references from
the given table name and the parent profile. | public static void | createTable(AbstractDataStoreInterface dsi, String domainClass, String valueClass, boolean bIsHist) | public static void | generateTable(AbstractDataStoreInterface dsi, String sProfileTable, String sTableName) Creates table for property instances associated to the specified
profile table and with the given table name. | protected ColumnRef | getColumnForData() | public static String | getDBTableName(Profile profile, String sClassname) Returns the database table for the property instance which will be
attached to the specified Profile and contain values
of the type specified by the given class name. | public String | getDBTableName() | public static String | getDBTableName(String domainClass, String valueClass, boolean bIsHist) Returns the name of the property instance table for objects of
type domainClass which have relationships to objects
of type valueClass. | public ColumnRef | getInstanceColumnRef(String sColumn, boolean bIsHist) | public JoinConditions | getInstanceJoinConditions(String sObjectTag, boolean bIsOuter) | public Object | getValue() | public Object | getValue(int nIndex) | protected Object | getValueToStoreForValue(Object val) | public List | getValues() | public boolean | match(AbstractPropertyInstance propInst) | public void | populate(Element xmlElement, State state) | public List | processResultSet(CachedResultSet resultSet, SelectStatement select) | public List | processResultSet(CachedResultSet resultSet, SelectStatement select, int limit) | public Element | publish(Element formEl, HarmoniseOutput xmlDoc, State state) | public Element | publish(Template template, HarmoniseOutput xmlDoc, State state) | protected void | removeChildReferences(AbstractChildObject child) Removes the reference to child from the property instance database
table, used to discard invalid references. | public void | removeValue(AbstractChildObject child) Removes the specified AbstractChildObject from
this property instance's list of values. | protected void | setDBTable(Profile profile) | public void | setValues(List values) |
CLMN_OBJECT_ID | final protected static String CLMN_OBJECT_ID(Code) | | |
ChildObjectPropertyInstance | public ChildObjectPropertyInstance()(Code) | | Constructs a property instance.
|
ChildObjectPropertyInstance | public ChildObjectPropertyInstance(AbstractDataStoreInterface dbint)(Code) | | Constructs a property instance with a data store interface.
Parameters: dbint - the data store interface |
ChildObjectPropertyInstance | public ChildObjectPropertyInstance(AbstractDataStoreInterface dbintrf, Profile profile)(Code) | | Constructs a property instance with a data store interface and a
reference to the Profile which will contain this instance.
Parameters: dbintrf - the data store interface Parameters: profile - the owner Profile |
ChildObjectPropertyInstance | public ChildObjectPropertyInstance(AbstractDataStoreInterface dbintrf, int nPropertyId, Profile profile)(Code) | | Constructs a property instance with a data store interface, a reference
to the Profile which will contain this instance and a
reference to the Property of which this is property instance
is an instance of.
Parameters: dbintrf - the data store interface Parameters: nPropertyId - the id of the Property Parameters: profile - the owner Profile |
ChildObjectPropertyInstance | public ChildObjectPropertyInstance(AbstractDataStoreInterface dbintrf, Property prop)(Code) | | Constructs a property instance with a data store interface and referenec
to the Property it is an instance of.
Parameters: dbintrf - the data store interface Parameters: prop - the Property this is an instance of |
ChildObjectPropertyInstance | public ChildObjectPropertyInstance(AbstractDataStoreInterface dbintrf, Property property, Profile profile)(Code) | | Constructs a property instance with a data store interface, a
reference to the Profile which will contain this object
and a reference to the Property which this object is an
instance of.
Parameters: dbintrf - the data store interface Parameters: property - the Property Parameters: profile - the owner Profile |
addValue | public void addValue(AbstractChildObject child, int nId) throws PopulateException(Code) | | Adds the given AbstractChildObject as a value to this
property instance with the specified id.
Parameters: child - the new value to add to this property instance Parameters: nId - the id to associate with this value throws: InvalidPropertyValueException - if the value given is invalid |
constructDBTableName | public static String constructDBTableName(Profile profile, String sTable)(Code) | | Returns the name of the property instance data base table
for holding AbstractChildObject value references from
the given table name and the parent profile.
The table name is determined by the profile database table name
and the given table name.
The given table name must be the table name associated to a
AbstractChildObject such as Document ,
User , etc.
Parameters: profile - the owner Profile Parameters: sTable - the name of the table associated to a AbstractChildObject the name of the property instance data base table |
createTable | public static void createTable(AbstractDataStoreInterface dsi, String domainClass, String valueClass, boolean bIsHist) throws DataAccessException, DataStoreException(Code) | | Creates the table required to hold property instances for the profiled
object of type domainClass and with values of type
valueClass
Parameters: m_dsi - the data store interface Parameters: domainClass - the class name of the profiled object Parameters: valueClass - the class name of the values of the property instance Parameters: bIsHist - true if the table is historical throws: DataStoreException - if there is an error creating the new database table throws: DataAccessException - if there is an error constructing the details of the new table |
generateTable | public static void generateTable(AbstractDataStoreInterface dsi, String sProfileTable, String sTableName) throws DataStoreException(Code) | | Creates table for property instances associated to the specified
profile table and with the given table name.
Parameters: dsi - the data store interface Parameters: sProfileTable - the profile table name Parameters: sTableName - the new table name throws: DataStoreException - if an error occurs creating the table |
getDBTableName | public static String getDBTableName(Profile profile, String sClassname) throws DataStoreException(Code) | | Returns the database table for the property instance which will be
attached to the specified Profile and contain values
of the type specified by the given class name.
The table name is determined by the profile database table name
and the type of AbstractChildObject .
Parameters: profile - the owning Profile Parameters: sClassname - the class name of the AbstractChildObject value for the property instance the database table for the property instance throws: DataStoreException - if there is an error obtaining the databasetable name for the given AbstractChildObject class name |
getDBTableName | public static String getDBTableName(String domainClass, String valueClass, boolean bIsHist) throws DataAccessException(Code) | | Returns the name of the property instance table for objects of
type domainClass which have relationships to objects
of type valueClass.
Parameters: domainClass - the class name of the profile object Parameters: valueClass - the class name of the objects which will be values of the property instance Parameters: bIsHist - true if the table is historical the name of the property instance table throws: DataAccessException - if an error occurs constructing the table name |
removeChildReferences | protected void removeChildReferences(AbstractChildObject child) throws DataStoreException(Code) | | Removes the reference to child from the property instance database
table, used to discard invalid references.
Parameters: child - the child whose reference is to be removed throws: DataStoreException - if there is an error deleting data from the database |
|
|