com.aurel.track.persist
Class BaseTClass

java.lang.Object
  extended by BaseObject
      extended by com.aurel.track.persist.BaseTClass
Direct Known Subclasses:
TClass

public abstract class BaseTClass
extends BaseObject

You should not use this class directly. It should not even be extended all references should be to TClass


Field Summary
protected  java.util.List collTWorkItems
          Collection to store aggregation of collTWorkItems
 
Constructor Summary
BaseTClass()
           
 
Method Summary
 void addTWorkItem(TWorkItem l)
          Method called to associate a TWorkItem object to this object through the TWorkItem foreign key attribute
 void addTWorkItem(TWorkItem l, java.sql.Connection con)
          Method called to associate a TWorkItem object to this object through the TWorkItem foreign key attribute using connection.
protected  void addTWorkItemFromBean(TWorkItem toAdd)
          Method called to associate a TWorkItem object to this object.
 TClass copy()
          Makes a copy of this object.
 TClass copy(boolean deepcopy)
          Makes a copy of this object.
 TClass copy(boolean deepcopy, java.sql.Connection con)
          Makes a copy of this object using connection.
 TClass copy(java.sql.Connection con)
          Makes a copy of this object using connection.
protected  TClass copyInto(TClass copyObj)
          Fills the copyObj with the contents of this object.
protected  TClass copyInto(TClass copyObj, boolean deepcopy)
          Fills the copyObj with the contents of this object.
protected  TClass copyInto(TClass copyObj, boolean deepcopy, java.sql.Connection con)
          Fills the copyObj with the contents of this object using connection.
protected  TClass copyInto(TClass copyObj, java.sql.Connection con)
          Fills the copyObj with the contents of this object using connection.
static TClass createTClass(TClassBean bean)
          Creates an instance of TClass with the contents of a TClassBean.
static TClass createTClass(TClassBean bean, IdentityMap createdObjects)
          Creates an instance of TClass with the contents of a TClassBean.
 TClassBean getBean()
          Creates a TClassBean with the contents of this object This also creates beans for cached related objects, if they exist
 TClassBean getBean(IdentityMap createdBeans)
          Creates a TClassBean with the contents of this object intended for internal use only
 java.lang.Object getByName(java.lang.String name)
          Retrieves a field from the object by field (Java) name passed in as a String.
 java.lang.Object getByPeerName(java.lang.String name)
          Retrieves a field from the object by name passed in as a String.
 java.lang.Object getByPosition(int pos)
          Retrieves a field from the object by Position as specified in the xml schema.
static java.util.List getFieldNames()
          Generate a list of field names.
 java.lang.String getLabel()
          Get the Label
 java.lang.Integer getObjectID()
          Get the ObjectID
 TClassPeer getPeer()
          returns a peer instance associated with this om.
 ObjectKey getPrimaryKey()
          returns an id that differentiates this object from others of its class.
 java.lang.Integer getProjectID()
          Get the ProjectID
 TableMap getTableMap()
          Retrieves the TableMap object related to this Table data without compiler warnings of using getPeer().getTableMap().
 TProject getTProject()
          Returns the associated TProject object.
 TProject getTProject(java.sql.Connection connection)
          Return the associated TProject object If it was not retrieved before, the object is retrieved from the database using the passed connection
 java.util.List getTWorkItems()
          If this collection has already been initialized, returns the collection.
 java.util.List getTWorkItems(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
 java.util.List getTWorkItems(Criteria criteria, java.sql.Connection con)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTClass(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTListType(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTPersonRelatedByChangedByID(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTPersonRelatedByOriginatorID(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTPersonRelatedByOwnerID(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTPersonRelatedByResponsibleID(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTPriority(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTProjectCategory(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTReleaseRelatedByReleaseNoticedID(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTReleaseRelatedByReleaseScheduledID(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTSeverity(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  java.util.List getTWorkItemsJoinTState(Criteria criteria)
          If this collection has already been initialized with an identical criteria, it returns the collection.
protected  void initTWorkItems()
          Temporary storage of collTWorkItems to save a possible db hit in the event objects are add to the collection, but the complete collection is never requested.
 void save()
          Stores the object in the database.
 void save(java.sql.Connection con)
          Stores the object in the database.
 void save(java.lang.String dbName)
          Stores the object in the database.
 boolean setByName(java.lang.String name, java.lang.Object value)
          Set a field in the object by field (Java) name.
 boolean setByPeerName(java.lang.String name, java.lang.Object value)
          Set field values by Peer Field Name
 boolean setByPosition(int position, java.lang.Object value)
          Set field values by its position (zero based) in the XML schema.
 void setLabel(java.lang.String v)
          Set the value of Label
 void setObjectID(java.lang.Integer v)
          Set the value of ObjectID
 void setPrimaryKey(ObjectKey key)
          Set the PrimaryKey using ObjectKey.
 void setProjectID(java.lang.Integer v)
          Set the value of ProjectID
 void setTProject(TProject v)
          Declares an association between this object and a TProject object
 void setTProjectKey(ObjectKey key)
          Provides convenient way to set a relationship based on a ObjectKey, for example bar.setFooKey(foo.getPrimaryKey())
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

collTWorkItems

protected java.util.List collTWorkItems
Collection to store aggregation of collTWorkItems

Constructor Detail

BaseTClass

public BaseTClass()
Method Detail

getObjectID

public java.lang.Integer getObjectID()
Get the ObjectID

Returns:
Integer

setObjectID

public void setObjectID(java.lang.Integer v)
                 throws TorqueException
Set the value of ObjectID

Parameters:
v - new value
Throws:
TorqueException

getLabel

public java.lang.String getLabel()
Get the Label

Returns:
String

setLabel

public void setLabel(java.lang.String v)
Set the value of Label

Parameters:
v - new value

getProjectID

public java.lang.Integer getProjectID()
Get the ProjectID

Returns:
Integer

setProjectID

public void setProjectID(java.lang.Integer v)
                  throws TorqueException
Set the value of ProjectID

Parameters:
v - new value
Throws:
TorqueException

setTProject

public void setTProject(TProject v)
                 throws TorqueException
Declares an association between this object and a TProject object

Parameters:
v - TProject
Throws:
TorqueException

getTProject

public TProject getTProject()
                     throws TorqueException
Returns the associated TProject object. If it was not retrieved before, the object is retrieved from the database

Returns:
the associated TProject object
Throws:
TorqueException

getTProject

public TProject getTProject(java.sql.Connection connection)
                     throws TorqueException
Return the associated TProject object If it was not retrieved before, the object is retrieved from the database using the passed connection

Parameters:
connection - the connection used to retrieve the associated object from the database, if it was not retrieved before
Returns:
the associated TProject object
Throws:
TorqueException

setTProjectKey

public void setTProjectKey(ObjectKey key)
                    throws TorqueException
Provides convenient way to set a relationship based on a ObjectKey, for example bar.setFooKey(foo.getPrimaryKey())

Throws:
TorqueException

initTWorkItems

protected void initTWorkItems()
Temporary storage of collTWorkItems to save a possible db hit in the event objects are add to the collection, but the complete collection is never requested.


addTWorkItem

public void addTWorkItem(TWorkItem l)
                  throws TorqueException
Method called to associate a TWorkItem object to this object through the TWorkItem foreign key attribute

Parameters:
l - TWorkItem
Throws:
TorqueException

addTWorkItem

public void addTWorkItem(TWorkItem l,
                         java.sql.Connection con)
                  throws TorqueException
Method called to associate a TWorkItem object to this object through the TWorkItem foreign key attribute using connection.

Parameters:
l - TWorkItem
Throws:
TorqueException

getTWorkItems

public java.util.List getTWorkItems()
                             throws TorqueException
If this collection has already been initialized, returns the collection. Otherwise returns the results of getTWorkItems(new Criteria())

Returns:
the collection of associated objects
Throws:
TorqueException

getTWorkItems

public java.util.List getTWorkItems(Criteria criteria)
                             throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass has previously been saved, it will retrieve related TWorkItems from storage. If this TClass is new, it will return an empty collection or the current collection, the criteria is ignored on a new object.

Throws:
TorqueException

getTWorkItems

public java.util.List getTWorkItems(Criteria criteria,
                                    java.sql.Connection con)
                             throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass has previously been saved, it will retrieve related TWorkItems from storage. If this TClass is new, it will return an empty collection or the current collection, the criteria is ignored on a new object. This method takes in the Connection also as input so that referenced objects can also be obtained using a Connection that is taken as input

Throws:
TorqueException

getTWorkItemsJoinTPersonRelatedByOwnerID

protected java.util.List getTWorkItemsJoinTPersonRelatedByOwnerID(Criteria criteria)
                                                           throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTPersonRelatedByChangedByID

protected java.util.List getTWorkItemsJoinTPersonRelatedByChangedByID(Criteria criteria)
                                                               throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTPersonRelatedByOriginatorID

protected java.util.List getTWorkItemsJoinTPersonRelatedByOriginatorID(Criteria criteria)
                                                                throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTPersonRelatedByResponsibleID

protected java.util.List getTWorkItemsJoinTPersonRelatedByResponsibleID(Criteria criteria)
                                                                 throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTProjectCategory

protected java.util.List getTWorkItemsJoinTProjectCategory(Criteria criteria)
                                                    throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTListType

protected java.util.List getTWorkItemsJoinTListType(Criteria criteria)
                                             throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTClass

protected java.util.List getTWorkItemsJoinTClass(Criteria criteria)
                                          throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTPriority

protected java.util.List getTWorkItemsJoinTPriority(Criteria criteria)
                                             throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTSeverity

protected java.util.List getTWorkItemsJoinTSeverity(Criteria criteria)
                                             throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTReleaseRelatedByReleaseNoticedID

protected java.util.List getTWorkItemsJoinTReleaseRelatedByReleaseNoticedID(Criteria criteria)
                                                                     throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTReleaseRelatedByReleaseScheduledID

protected java.util.List getTWorkItemsJoinTReleaseRelatedByReleaseScheduledID(Criteria criteria)
                                                                       throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getTWorkItemsJoinTState

protected java.util.List getTWorkItemsJoinTState(Criteria criteria)
                                          throws TorqueException
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this TClass is new, it will return an empty collection; or if this TClass has previously been saved, it will retrieve related TWorkItems from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in TClass.

Throws:
TorqueException

getFieldNames

public static java.util.List getFieldNames()
Generate a list of field names.

Returns:
a list of field names

getByName

public java.lang.Object getByName(java.lang.String name)
Retrieves a field from the object by field (Java) name passed in as a String.

Parameters:
name - field name
Returns:
value

setByName

public boolean setByName(java.lang.String name,
                         java.lang.Object value)
                  throws TorqueException,
                         java.lang.IllegalArgumentException
Set a field in the object by field (Java) name.

Parameters:
name - field name
value - field value
Returns:
True if value was set, false if not (invalid name / protected field).
Throws:
java.lang.IllegalArgumentException - if object type of value does not match field object type.
TorqueException - If a problem occurs with the set[Field] method.

getByPeerName

public java.lang.Object getByPeerName(java.lang.String name)
Retrieves a field from the object by name passed in as a String. The String must be one of the static Strings defined in this Class' Peer.

Parameters:
name - peer name
Returns:
value

setByPeerName

public boolean setByPeerName(java.lang.String name,
                             java.lang.Object value)
                      throws TorqueException,
                             java.lang.IllegalArgumentException
Set field values by Peer Field Name

Parameters:
name - field name
value - field value
Returns:
True if value was set, false if not (invalid name / protected field).
Throws:
java.lang.IllegalArgumentException - if object type of value does not match field object type.
TorqueException - If a problem occurs with the set[Field] method.

getByPosition

public java.lang.Object getByPosition(int pos)
Retrieves a field from the object by Position as specified in the xml schema. Zero-based.

Parameters:
pos - position in xml schema
Returns:
value

setByPosition

public boolean setByPosition(int position,
                             java.lang.Object value)
                      throws TorqueException,
                             java.lang.IllegalArgumentException
Set field values by its position (zero based) in the XML schema.

Parameters:
position - The field position
value - field value
Returns:
True if value was set, false if not (invalid position / protected field).
Throws:
java.lang.IllegalArgumentException - if object type of value does not match field object type.
TorqueException - If a problem occurs with the set[Field] method.

save

public void save()
          throws java.lang.Exception
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed.

Throws:
java.lang.Exception

save

public void save(java.lang.String dbName)
          throws TorqueException
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed. Note: this code is here because the method body is auto-generated conditionally and therefore needs to be in this file instead of in the super class, BaseObject.

Parameters:
dbName -
Throws:
TorqueException

save

public void save(java.sql.Connection con)
          throws TorqueException
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed. This method is meant to be used as part of a transaction, otherwise use the save() method and the connection details will be handled internally

Parameters:
con -
Throws:
TorqueException

setPrimaryKey

public void setPrimaryKey(ObjectKey key)
                   throws TorqueException
Set the PrimaryKey using ObjectKey.

Parameters:
key - objectID ObjectKey
Throws:
TorqueException

getPrimaryKey

public ObjectKey getPrimaryKey()
returns an id that differentiates this object from others of its class.


copy

public TClass copy()
            throws TorqueException
Makes a copy of this object. It creates a new object filling in the simple attributes. It then fills all the association collections and sets the related objects to isNew=true.

Throws:
TorqueException

copy

public TClass copy(java.sql.Connection con)
            throws TorqueException
Makes a copy of this object using connection. It creates a new object filling in the simple attributes. It then fills all the association collections and sets the related objects to isNew=true.

Parameters:
con - the database connection to read associated objects.
Throws:
TorqueException

copy

public TClass copy(boolean deepcopy)
            throws TorqueException
Makes a copy of this object. It creates a new object filling in the simple attributes. If the parameter deepcopy is true, it then fills all the association collections and sets the related objects to isNew=true.

Parameters:
deepcopy - whether to copy the associated objects.
Throws:
TorqueException

copy

public TClass copy(boolean deepcopy,
                   java.sql.Connection con)
            throws TorqueException
Makes a copy of this object using connection. It creates a new object filling in the simple attributes. If the parameter deepcopy is true, it then fills all the association collections and sets the related objects to isNew=true.

Parameters:
deepcopy - whether to copy the associated objects.
con - the database connection to read associated objects.
Throws:
TorqueException

copyInto

protected TClass copyInto(TClass copyObj)
                   throws TorqueException
Fills the copyObj with the contents of this object. The associated objects are also copied and treated as new objects.

Parameters:
copyObj - the object to fill.
Throws:
TorqueException

copyInto

protected TClass copyInto(TClass copyObj,
                          java.sql.Connection con)
                   throws TorqueException
Fills the copyObj with the contents of this object using connection. The associated objects are also copied and treated as new objects.

Parameters:
copyObj - the object to fill.
con - the database connection to read associated objects.
Throws:
TorqueException

copyInto

protected TClass copyInto(TClass copyObj,
                          boolean deepcopy)
                   throws TorqueException
Fills the copyObj with the contents of this object. If deepcopy is true, The associated objects are also copied and treated as new objects.

Parameters:
copyObj - the object to fill.
deepcopy - whether the associated objects should be copied.
Throws:
TorqueException

copyInto

protected TClass copyInto(TClass copyObj,
                          boolean deepcopy,
                          java.sql.Connection con)
                   throws TorqueException
Fills the copyObj with the contents of this object using connection. If deepcopy is true, The associated objects are also copied and treated as new objects.

Parameters:
copyObj - the object to fill.
deepcopy - whether the associated objects should be copied.
con - the database connection to read associated objects.
Throws:
TorqueException

getPeer

public TClassPeer getPeer()
returns a peer instance associated with this om. Since Peer classes are not to have any instance attributes, this method returns the same instance for all member of this class. The method could therefore be static, but this would prevent one from overriding the behavior.


getTableMap

public TableMap getTableMap()
                     throws TorqueException
Retrieves the TableMap object related to this Table data without compiler warnings of using getPeer().getTableMap().

Returns:
The associated TableMap object.
Throws:
TorqueException

getBean

public TClassBean getBean()
Creates a TClassBean with the contents of this object This also creates beans for cached related objects, if they exist

Returns:
a TClassBean with the contents of this object

getBean

public TClassBean getBean(IdentityMap createdBeans)
Creates a TClassBean with the contents of this object intended for internal use only

Parameters:
createdBeans - a IdentityMap which maps objects to already created beans
Returns:
a TClassBean with the contents of this object

createTClass

public static TClass createTClass(TClassBean bean)
                           throws TorqueException
Creates an instance of TClass with the contents of a TClassBean. This behaviour could have also been achieved using a constructor, however as this class is abstract no constructors are allowed

Parameters:
bean - the TClassBean which contents are used to create the resulting class
Returns:
an instance of TClass with the contents of bean
Throws:
TorqueException

createTClass

public static TClass createTClass(TClassBean bean,
                                  IdentityMap createdObjects)
                           throws TorqueException
Creates an instance of TClass with the contents of a TClassBean. This behaviour could have also been achieved using a constructor, however as this class is abstract no constructors are allowed. This method is intended for internal use only.

Parameters:
bean - the TClassBean which contents are used to create the resulting class
createdObjects - a IdentityMap which maps beans to already created objects
Returns:
an instance of TClass with the contents of bean
Throws:
TorqueException

addTWorkItemFromBean

protected void addTWorkItemFromBean(TWorkItem toAdd)
Method called to associate a TWorkItem object to this object. through the TWorkItem foreign key attribute

Parameters:
toAdd - TWorkItem

toString

public java.lang.String toString()


Issue Tracking with Track+: Home Page      Copyright © 2008 Trackplus. All Rights Reserved.