AbstractPropertyInstance(AbstractDataStoreInterface dbintrf, int nPropertyId, Profile profile) Constructs a property instance with an interface to the data store,
a reference to the Profile which will contain this
property instance and a reference to the Property
identified by the specified id.
public
AbstractPropertyInstance(AbstractDataStoreInterface dbintrf, Property property, Profile profile) Constructs a property instance with an interface to the data store,
a reference to the Profile which will contain this
property instance and a reference to the Property
which this object is an instance of.
Method Summary
protected void
addValue(Object obj) Adds a value to this property instance.
protected void
addValue(Object val, int nId) Adds the given object as a value to this property instance with
the associated id.
Constructs a property instance with an interface to
the data store and a reference to the Profile which
will contain this property instance.
Parameters: dbintrf - the data store interface Parameters: profile - the owner Profile
Constructs a property instance of the specified Property
with an interface to the data store.
Parameters: dbintrf - the data store interface Parameters: prop - the Property that this object is an instance of
Constructs a property instance with an interface to the data store,
a reference to the Profile which will contain this
property instance and a reference to the Property
identified by the specified id.
Parameters: dbintrf - the data store interface Parameters: nPropertyId - the id of the Property that this object is an instance of Parameters: profile - the owner Profile
Constructs a property instance with an interface to the data store,
a reference to the Profile which will contain this
property instance 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
Adds a value to this property instance.
Parameters: obj - the value to add throws: InvalidPropertyValueException - if the value is invalid forthis property instance
Adds the given object as a value to this property instance with
the associated id.
Parameters: val - the value to add Parameters: nId - the id of the value throws: InvalidPropertyValueException - if the value is invalid forthis property instance
Returns the column reference for the data column for this property
instance.
Utility method to ensure sub classes will implement the required
functionality to get column reference to the value column of the
database table
the column reference for the data column for this propertyinstance. throws: DataStoreException - if an error occurs constructing thecolumn reference
Returns the name of the Property this object is an
instance of.
the name of the Property this object is an instance of. throws: DataAccessException - if there is an error accessing the name of the Property
Returns a representation of the specified value suitable
for saving to the database.
Parameters: val - the value a representation of the specified value suitablefor saving to the database. throws: ProfileException - if an error occurs transforming the valueto a representation suitable for the database
Returns true if this property instance has changed
since populated from the database, otherwise falsetrue if this property instance has changed since populated from the database.
Returns true if this object matches the
given AbstractPropertyInstance.
Parameters: propInst - the property instance to match true if this object matches the given AbstractPropertyInstance. throws: ProfileException - if an error occurs
Saves this property instance to the database.
Parameters: profile - the owning Profile for this property instance. The Profile determines whichdatabase table the data get saved to. throws: ProfileException - if the property instance can not besaved due to a lack of either an associated Profileor Property throws: EditException - if any other errors occur while saving data
Sets this property instance as having changed since being populated
from the database.
Parameters: bIsChanged - true if this property instancehas been changed, otherwise false
Sets this object as having been populated.
Parameters: bIsPopulated - true to indicate that this propertyinstance has been populated from the database
setIsTemporary
public void setIsTemporary(boolean bIsTemporary)(Code)
Sets whether this property instance is temporary. A temporary
property instance is not saved to the database.
bIsTemporary true if this property instance is to be temporary, otherwise false
Sets the operator to be used in comparisons involving this
property instance.
Parameters: sOperator - the operator to be used in comparisons involving this property instance
Updates this property instance in the database.
Parameters: prof - the owning Profile for this property instance throws: ProfileException - if any errors occur saving the data throws: EditException - if any other errors occur saving the data