Java Doc for AbstractPropertyInstance.java in  » Content-Management-System » harmonise » org » openharmonise » rm » metadata » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » harmonise » org.openharmonise.rm.metadata 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openharmonise.rm.metadata.AbstractPropertyInstance

All known Subclasses:   org.openharmonise.rm.metadata.ChildObjectPropertyInstance,  org.openharmonise.rm.metadata.ProfilePropertyInstance,  org.openharmonise.rm.metadata.GeneralPropertyInstance,
AbstractPropertyInstance
abstract public class AbstractPropertyInstance implements Cloneable,DataStoreObject,Publishable(Code)
Abstract class to handle the basic functionality for an instance of a Property.
author:
   Michael Bell
version:
   $Revision: 1.5 $


Field Summary
final public static  StringATTRIB_OBJECT_TYPE
    
final public static  StringATTRIB_OPERATOR
    
final public static  StringATTRIB_PROPERTY_ID
    
final protected static  StringCLMN_ID
    
final protected static  StringCLMN_PROFILE_ID
    
final protected static  StringCLMN_PROPERTY_ID
    
final protected static  StringCLMN_VERSION_COMMENT
    
final protected static  StringEXT_HIST
    
final protected static  StringSEQ_PROFILE_DATA
    
final public static  StringTAG_ATTACH
    
final public static  StringTAG_DETACH
    
final public static  StringTAG_PROPERTYINSTANCE
    
final public static  StringTAG_PROP_INSTANCE_VALUES
    
final public static  StringTAG_VALUE
    
protected  booleanm_bIsTemporary
    
protected  AbstractDataStoreInterfacem_dsi
    
protected  Profilem_profile
    
protected  CachePointerm_property_ptr
    
protected  Stringm_sDataTable
    
protected  Stringm_sOperator
    
protected  Listm_valueIds
    
protected  Listm_values
    
protected  Listm_values2Add
    
protected  Listm_values2Remove
    

Constructor Summary
public  AbstractPropertyInstance()
    
public  AbstractPropertyInstance(AbstractDataStoreInterface dbint)
     Constructs a property instance with an interface to the data store.
public  AbstractPropertyInstance(AbstractDataStoreInterface dbintrf, Profile profile)
     Constructs a property instance with an interface to the data store and a reference to the Profile which will contain this property instance.
public  AbstractPropertyInstance(AbstractDataStoreInterface dbintrf, Property prop)
     Constructs a property instance of the specified Property with an interface to the data store.
public  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  voidaddValue(Object obj)
     Adds a value to this property instance.
protected  voidaddValue(Object val, int nId)
     Adds the given object as a value to this property instance with the associated id.
public  voidclearValues()
     Clears the list of values.
public  Objectclone()
    
public  booleanequals(Object obj)
    
abstract protected  ColumnRefgetColumnForData()
     Returns the column reference for the data column for this property instance.
public  StringgetDBTableName()
    
public  intgetId()
    
public  ColumnRefgetInstanceColumnRef(String sColumn, boolean bIsHist)
    
public  StringgetName()
     Returns the name of the Property this object is an instance of.
public  StringgetOperator()
     Returns the operator associated to this property instance, for use in comparisons.
public  ProfilegetProfile()
     Returns the Profile which contains this property instance.
protected  AbstractProfiledObjectgetProfiledObject()
     Returns the profiled object which this property instance is assocated with.
public  PropertygetProperty()
     Returns the Property for which this object is an instance.
public  StringgetTagName()
    
public  ObjectgetValue()
     Returns the first value of this property instance's values.
public  ObjectgetValue(int nIndex)
     Returns a value at the specified index in the list of values.
abstract protected  ObjectgetValueToStoreForValue(Object val)
     Returns a representation of the specified value suitable for saving to the database.
public  ListgetValues()
     Returns the list values of this property instance.
public  StringgetVersionComment()
     Returns the comment associated with this version.
public  booleanhasValues()
     Returns true if this object has values.
protected  booleanisChanged()
    
protected  booleanisHistorical()
     Returns true if this property instance is historical, otherwise false.
public  booleanisPopulated()
     Returns true if this property instance has been populated from the database.
public  booleanisTemporary()
     Returns true if this property instance is temporary and will therefore not be saved to the database.
abstract public  booleanmatch(AbstractPropertyInstance propInst)
     Returns true if this object matches the given AbstractPropertyInstance.
public  booleanmerge(AbstractPropertyInstance property)
     Merge the given property instance with this property instance.
public  voidpopulate(Element xmlElement, State state)
    
public  Elementpublish(Template template, HarmoniseOutput xmlDoc, State state)
    
public  Elementpublish(Element formEl, HarmoniseOutput xmlDoc, State state)
    
public  voidremoveValue(Object val)
     Removes the specified value from this instance's list of values.
protected  voidsave(Profile prof)
     Saves this property instance to the database.
Parameters:
  profile - the owning Profile for this property instance.
abstract protected  voidsetDBTable(Profile profile)
     Sets profile data table name.
public  voidsetDataStoreInterface(AbstractDataStoreInterface dsi)
    
protected  voidsetHistorical(boolean bIsHist)
     Sets this property instance as being historical.
protected  voidsetIsChanged(boolean bIsChanged)
     Sets this property instance as having changed since being populated from the database.
protected  voidsetIsPopulated(boolean bIsPopulated)
     Sets this object as having been populated.
public  voidsetIsTemporary(boolean bIsTemporary)
     Sets whether this property instance is temporary.
public  voidsetOperator(String sOperator)
     Sets the operator to be used in comparisons involving this property instance.
public  voidsetProfile(Profile prof)
     Sets the Profile which will contain this property instance.
public  voidsetProperty(Property prop)
     Sets the Property for which this object is an instance.
public  voidsetValues(List values)
     Sets the values of this instance.
public  voidsetVersionComment(String sComment)
     Sets the comment associated to this version of the object.
protected  voidupdate(Profile prof)
     Updates this property instance in the database.

Field Detail
ATTRIB_OBJECT_TYPE
final public static String ATTRIB_OBJECT_TYPE(Code)
Object type attribute name



ATTRIB_OPERATOR
final public static String ATTRIB_OPERATOR(Code)
Operator attribute name



ATTRIB_PROPERTY_ID
final public static String ATTRIB_PROPERTY_ID(Code)
Property id attribute name



CLMN_ID
final protected static String CLMN_ID(Code)
Id database column name



CLMN_PROFILE_ID
final protected static String CLMN_PROFILE_ID(Code)
Profile id database column name



CLMN_PROPERTY_ID
final protected static String CLMN_PROPERTY_ID(Code)
Property id database column name



CLMN_VERSION_COMMENT
final protected static String CLMN_VERSION_COMMENT(Code)
Version comment database column name



EXT_HIST
final protected static String EXT_HIST(Code)
The suffix attached to the historical property instance database table name



SEQ_PROFILE_DATA
final protected static String SEQ_PROFILE_DATA(Code)
Property instance id sequence name



TAG_ATTACH
final public static String TAG_ATTACH(Code)
Attach XML element name



TAG_DETACH
final public static String TAG_DETACH(Code)
Detach XML element name



TAG_PROPERTYINSTANCE
final public static String TAG_PROPERTYINSTANCE(Code)
Property instance tag name



TAG_PROP_INSTANCE_VALUES
final public static String TAG_PROP_INSTANCE_VALUES(Code)
Property instance values tag name



TAG_VALUE
final public static String TAG_VALUE(Code)
Generic property instance value tag name



m_bIsTemporary
protected boolean m_bIsTemporary(Code)
boolean flag which indicates whether this property instance can be saved to the database



m_dsi
protected AbstractDataStoreInterface m_dsi(Code)
The data store interface



m_profile
protected Profile m_profile(Code)
The owning profile



m_property_ptr
protected CachePointer m_property_ptr(Code)
A weak reference to the Property this instance is an instance of



m_sDataTable
protected String m_sDataTable(Code)
The database table holding data for this property instance



m_sOperator
protected String m_sOperator(Code)
The current operator to be used in any value comparisons



m_valueIds
protected List m_valueIds(Code)
The list of ids corresponding to the current list of property instance values



m_values
protected List m_values(Code)
The list of property instance values



m_values2Add
protected List m_values2Add(Code)
The list of property instance values to be saved on the next save operation



m_values2Remove
protected List m_values2Remove(Code)
The list of property instance values to be removed on the next save operation




Constructor Detail
AbstractPropertyInstance
public AbstractPropertyInstance()(Code)
Constructs a property instance



AbstractPropertyInstance
public AbstractPropertyInstance(AbstractDataStoreInterface dbint)(Code)
Constructs a property instance with an interface to the data store.
Parameters:
  dbint - the data store interface



AbstractPropertyInstance
public AbstractPropertyInstance(AbstractDataStoreInterface dbintrf, Profile profile)(Code)
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



AbstractPropertyInstance
public AbstractPropertyInstance(AbstractDataStoreInterface dbintrf, Property prop)(Code)
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



AbstractPropertyInstance
public AbstractPropertyInstance(AbstractDataStoreInterface dbintrf, int nPropertyId, Profile profile)(Code)
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



AbstractPropertyInstance
public AbstractPropertyInstance(AbstractDataStoreInterface dbintrf, Property property, Profile profile)(Code)
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




Method Detail
addValue
protected void addValue(Object obj) throws PopulateException(Code)
Adds a value to this property instance.
Parameters:
  obj - the value to add
throws:
  InvalidPropertyValueException - if the value is invalid forthis property instance



addValue
protected void addValue(Object val, int nId) throws PopulateException(Code)
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



clearValues
public void clearValues()(Code)
Clears the list of values.



clone
public Object clone()(Code)



equals
public boolean equals(Object obj)(Code)



getColumnForData
abstract protected ColumnRef getColumnForData() throws DataStoreException(Code)
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



getDBTableName
public String getDBTableName()(Code)



getId
public int getId()(Code)



getInstanceColumnRef
public ColumnRef getInstanceColumnRef(String sColumn, boolean bIsHist) throws DataStoreException(Code)



getName
public String getName() throws DataAccessException(Code)
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



getOperator
public String getOperator()(Code)
Returns the operator associated to this property instance, for use in comparisons. the operator associated to this property instance



getProfile
public Profile getProfile()(Code)
Returns the Profile which contains this property instance. the Profile this property instance is contained by



getProfiledObject
protected AbstractProfiledObject getProfiledObject()(Code)
Returns the profiled object which this property instance is assocated with. the profiled object which this property instance isassocated with.



getProperty
public Property getProperty() throws DataAccessException(Code)
Returns the Property for which this object is an instance. the Property for which this object isan instance



getTagName
public String getTagName()(Code)



getValue
public Object getValue()(Code)
Returns the first value of this property instance's values. If there are no values a null is returned. the first value in the list of values



getValue
public Object getValue(int nIndex)(Code)
Returns a value at the specified index in the list of values. Returns null if no value exists at that index. the value at the specified index



getValueToStoreForValue
abstract protected Object getValueToStoreForValue(Object val) throws ProfileException(Code)
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



getValues
public List getValues()(Code)
Returns the list values of this property instance. the list values of this property instance



getVersionComment
public String getVersionComment()(Code)
Returns the comment associated with this version. the comment associated with this version



hasValues
public boolean hasValues()(Code)
Returns true if this object has values. true if this object has values.



isChanged
protected boolean isChanged()(Code)
Returns true if this property instance has changed since populated from the database, otherwise false true if this property instance has changed since populated from the database.



isHistorical
protected boolean isHistorical()(Code)
Returns true if this property instance is historical, otherwise false. true if this property instance is historical



isPopulated
public boolean isPopulated()(Code)
Returns true if this property instance has been populated from the database. true if this property instance has been populatedfrom the database



isTemporary
public boolean isTemporary()(Code)
Returns true if this property instance is temporary and will therefore not be saved to the database. true if this property instance is temporary



match
abstract public boolean match(AbstractPropertyInstance propInst) throws ProfileException(Code)
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



merge
public boolean merge(AbstractPropertyInstance property)(Code)
Merge the given property instance with this property instance.
Parameters:
  the - property instance to merge with this instance



populate
public void populate(Element xmlElement, State state) throws PopulateException(Code)



publish
public Element publish(Template template, HarmoniseOutput xmlDoc, State state) throws PublishException(Code)



publish
public Element publish(Element formEl, HarmoniseOutput xmlDoc, State state) throws PublishException(Code)



removeValue
public void removeValue(Object val)(Code)
Removes the specified value from this instance's list of values.
Parameters:
  val - the value to remove



save
protected void save(Profile prof) throws ProfileException, EditException(Code)
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



setDBTable
abstract protected void setDBTable(Profile profile)(Code)
Sets profile data table name.
Parameters:
  profile - the profile data table name



setDataStoreInterface
public void setDataStoreInterface(AbstractDataStoreInterface dsi)(Code)
Sets the data store interface
Parameters:
  dsi - the data store interface



setHistorical
protected void setHistorical(boolean bIsHist)(Code)
Sets this property instance as being historical.
Parameters:
  bIsHist - true if this property insatnce is to be historical



setIsChanged
protected void setIsChanged(boolean bIsChanged)(Code)
Sets this property instance as having changed since being populated from the database.
Parameters:
  bIsChanged - true if this property instancehas been changed, otherwise false



setIsPopulated
protected void setIsPopulated(boolean bIsPopulated)(Code)
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



setOperator
public void setOperator(String sOperator)(Code)
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



setProfile
public void setProfile(Profile prof)(Code)
Sets the Profile which will contain this property instance.
Parameters:
  prof - the Profile which will contain this property instance



setProperty
public void setProperty(Property prop) throws PopulateException(Code)
Sets the Property for which this object is an instance.
Parameters:
  prop - the Property for which this object isan instance



setValues
public void setValues(List values) throws InvalidPropertyValueException(Code)
Sets the values of this instance.
Parameters:
  values - a list of values



setVersionComment
public void setVersionComment(String sComment)(Code)
Sets the comment associated to this version of the object.
Parameters:
  sComment - the version comment



update
protected void update(Profile prof) throws ProfileException, EditException(Code)
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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.