Class BaseTorqueBasicGroup

    • Method Detail

      • isNew

        public boolean isNew()
        Returns whether the object has ever been saved. This will be false, if the object was retrieved from storage or was created and then saved.
        Specified by:
        isNew in interface org.apache.torque.om.ObjectModel
        Returns:
        true, if the object has never been persisted.
      • setNew

        public void setNew​(boolean isNew)
        Sets whether the object has ever been saved.
        Specified by:
        setNew in interface org.apache.torque.om.ObjectModel
        Parameters:
        isNew - true if the object has never been saved, false otherwise.
      • isModified

        public boolean isModified()
        Returns whether the object has been modified.
        Specified by:
        isModified in interface org.apache.torque.om.ObjectModel
        Returns:
        True if the object has been modified.
      • setModified

        public void setModified​(boolean modified)
        Sets whether the object has been modified.
        Specified by:
        setModified in interface org.apache.torque.om.ObjectModel
        Parameters:
        modified - true if the object has been modified, false otherwise.
      • resetModified

        public void resetModified()
        Sets the modified state for the object to be false.
      • isSaving

        public boolean isSaving()
        Returns whether this object is currently saving.
        Returns:
        true if this object is currently saving, false otherwise.
      • setSaving

        public void setSaving​(boolean saving)
        Sets whether this object is currently saving.
        Parameters:
        saving - true if this object is currently saving, false otherwise.
      • isLoading

        public boolean isLoading()
        Returns whether this object is currently being loaded from the database.
        Returns:
        true if this object is currently loading, false otherwise.
      • setLoading

        public void setLoading​(boolean loading)
        Sets whether this object is currently being loaded from the database.
        Parameters:
        loading - true if this object is currently loading, false otherwise.
      • isDeleted

        public boolean isDeleted()
        Returns whether this object was deleted from the database. Note that this getter does not automatically reflect database state, it will be set to true by Torque if doDelete() was called with this object. Bulk deletes and deletes via primary key do not change this flag. Also, if doDelete() was called on an object which does not exist in the database, the deleted flag is set to true even if it was not deleted.
        Returns:
        true if this object was deleted, false otherwise.
      • setDeleted

        public void setDeleted​(boolean deleted)
        Sets whether this object was deleted from the database.
        Parameters:
        deleted - true if this object was deleted, false otherwise.
      • initTorqueBasicUserGroups

        public List<TorqueBasicUserGroupinitTorqueBasicUserGroups()
        Initializes the cache collTorqueBasicUserGroups for referenced objects. This, means, if collTorqueBasicUserGroups is null when this operation is called, it is initialized with an empty collection, otherwise it remains unchanged.
        Returns:
        the (possibly new) content of the field collTorqueBasicUserGroups, not null.
      • isTorqueBasicUserGroupsInitialized

        public boolean isTorqueBasicUserGroupsInitialized()
        Checks whether the cache collTorqueBasicUserGroups for referenced objects has either been loaded from the database or has been manually initialized.
        Returns:
        boolean true if initialized
      • addTorqueBasicUserGroup

        public void addTorqueBasicUserGroup​(TorqueBasicUserGroup toAdd)
                                     throws org.apache.torque.TorqueException
        Method called to associate a TorqueBasicUserGroup object to this object through the collTorqueBasicUserGroups foreign key attribute. If the associated objects were not retrieved before and this object is not new, the associated objects are retrieved from the database before adding the toAdd object.
        Parameters:
        toAdd - the object to add to the associated objects, not null.
        Throws:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails.
        NullPointerException - if toAdd is null.
      • addTorqueBasicUserGroup

        public void addTorqueBasicUserGroup​(TorqueBasicUserGroup l,
                                            Connection con)
                                     throws org.apache.torque.TorqueException
        Method called to associate a TorqueBasicUserGroup object to this object through the collTorqueBasicUserGroups foreign key attribute using connection.
        Parameters:
        l - TorqueBasicUserGroup
        Throws:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails.
      • resetTorqueBasicUserGroup

        public void resetTorqueBasicUserGroup()
        Method called to reset the cache of TorqueBasicUserGroup objects which are related through the collTorqueBasicUserGroups foreign key attribute.
      • getTorqueBasicUserGroups

        public List<TorqueBasicUserGroupgetTorqueBasicUserGroups()
                                                            throws org.apache.torque.TorqueException
        If this collection has already been initialized, returns the collection. Otherwise returns the results of getTorqueBasicUserGroups(new Criteria())
        Returns:
        the collection of associated objects
        Throws:
        org.apache.torque.TorqueException
      • getTorqueBasicUserGroups

        public List<TorqueBasicUserGroupgetTorqueBasicUserGroups​(org.apache.torque.criteria.Criteria criteria)
                                                            throws org.apache.torque.TorqueException
        If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this BaseTorqueBasicGroup has previously been saved, it will retrieve related collTorqueBasicUserGroups from storage. If this BaseTorqueBasicGroup is new, it will return an empty collection or the current collection, the criteria is ignored on a new object.
        Throws:
        org.apache.torque.TorqueException - If a problem occurs with the get[criteria] method.
      • getTorqueBasicUserGroups

        public List<TorqueBasicUserGroupgetTorqueBasicUserGroups​(Connection con)
                                                            throws org.apache.torque.TorqueException
        If this collection has already been initialized, returns the collection. Otherwise returns the results of getTorqueBasicUserGroups(new Criteria(),Connection) 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
        Parameters:
        con - the Connection
        Returns:
        List results of the collection
        Throws:
        org.apache.torque.TorqueException - If a problem occurs with the get[connection] method.
      • getTorqueBasicUserGroups

        public List<TorqueBasicUserGroupgetTorqueBasicUserGroups​(org.apache.torque.criteria.Criteria criteria,
                                                                   Connection con)
                                                            throws org.apache.torque.TorqueException
        If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this BaseTorqueBasicGroup has previously been saved, it will retrieve the related TorqueBasicUserGroup Objects from storage. If this BaseTorqueBasicGroup 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
        Parameters:
        con - the Connection
        Returns:
        List results of the collection
        Throws:
        org.apache.torque.TorqueException - If a problem occurs with the get[connection] method.
      • getTorqueBasicUserGroupsJoinTorqueBasicUser

        protected List<TorqueBasicUserGroupgetTorqueBasicUserGroupsJoinTorqueBasicUser​(org.apache.torque.criteria.Criteria criteria)
                                                                                  throws org.apache.torque.TorqueException
        If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this BaseTorqueBasicGroup is new, it will return an empty collection; or if this thisObjectClassName has previously been saved, it will retrieve the related objects from storage. This method is protected by default in order to keep the public api reasonable. You can change the access modifier to public by overriding this method in the child class.
        Parameters:
        criteria - the criteria to use when filling the collection.
        Returns:
        List the collection
        Throws:
        org.apache.torque.TorqueException - if associated objects are not found
      • getTorqueBasicUserGroupsJoinTorqueBasicUser

        protected List<TorqueBasicUserGroupgetTorqueBasicUserGroupsJoinTorqueBasicUser​(org.apache.torque.criteria.Criteria criteria,
                                                                                         Connection connection)
                                                                                  throws org.apache.torque.TorqueException
        If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this BaseTorqueBasicGroup is new, it will return an empty collection; or if this BaseTorqueBasicGroup has previously been saved, it will retrieve the related objects from storage. This method is protected by default in order to keep the public api reasonable. You can change the access modifier to public by overriding this method in the child class.
        Overrides:
        getTorqueBasicUserGroupsJoinTorqueBasicUser in class TorqueAbstractBasicGroup
        Parameters:
        criteria - Criteria to define the selection of records
        connection - a database connection
        Returns:
        a list of User/Group relations
        Throws:
        org.apache.torque.TorqueException - if any database error occurs
      • save

        public void save()
                  throws org.apache.torque.TorqueException
        Stores an object in the database. If the object is new, it is inserted; otherwise an update is performed.
        Specified by:
        save in interface org.apache.torque.om.Persistent
        Throws:
        org.apache.torque.TorqueException - if an error occurs during saving.
      • save

        public void save​(String dbName)
                  throws org.apache.torque.TorqueException
        Stores an object in the database. If the object is new, it is inserted; otherwise an update is performed.
        Specified by:
        save in interface org.apache.torque.om.Persistent
        Parameters:
        dbName - the name of the database to which the object should be saved.
        Throws:
        org.apache.torque.TorqueException - if an error occurs during saving.
      • save

        public void save​(Connection con)
                  throws org.apache.torque.TorqueException
        Stores an object in the database. If the object is new, it is inserted; 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.
        Specified by:
        save in interface org.apache.torque.om.Persistent
        Parameters:
        con - the connection to use for saving the object, not null.
        Throws:
        org.apache.torque.TorqueException - if an error occurs during saving.
      • setPrimaryKey

        public void setPrimaryKey​(org.apache.torque.om.ObjectKey<?> key)
        Set the PrimaryKey using ObjectKey.
        Specified by:
        setPrimaryKey in interface org.apache.torque.om.ObjectModel
        Parameters:
        key - entityId ObjectKey
      • setPrimaryKey

        public void setPrimaryKey​(String key)
        Set the PrimaryKey using a String.
        Specified by:
        setPrimaryKey in interface org.apache.torque.om.ObjectModel
        Parameters:
        key - the primary key to set.
      • getPrimaryKey

        public org.apache.torque.om.ObjectKey<?> getPrimaryKey()
        returns an id that differentiates this object from others of its class.
        Specified by:
        getPrimaryKey in interface org.apache.torque.om.ObjectModel
      • copy

        public TorqueBasicGroup copy()
                              throws org.apache.torque.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:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails
      • copy

        public TorqueBasicGroup copy​(Connection con)
                              throws org.apache.torque.TorqueException
        Makes a copy of this object using a 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:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails
      • copy

        public TorqueBasicGroup copy​(boolean deepcopy)
                              throws org.apache.torque.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:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails
      • copy

        public TorqueBasicGroup copy​(boolean deepcopy,
                                     Connection con)
                              throws org.apache.torque.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:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails
      • copyInto

        public TorqueBasicGroup copyInto​(TorqueBasicGroup copyObj)
                                  throws org.apache.torque.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:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails
      • copyInto

        public TorqueBasicGroup copyInto​(TorqueBasicGroup copyObj,
                                         Connection con)
                                  throws org.apache.torque.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:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails
      • copyInto

        protected TorqueBasicGroup copyInto​(TorqueBasicGroup copyObj,
                                            boolean deepcopy)
                                     throws org.apache.torque.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:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails
      • copyInto

        public TorqueBasicGroup copyInto​(TorqueBasicGroup copyObj,
                                         boolean deepcopy,
                                         Connection con)
                                  throws org.apache.torque.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:
        org.apache.torque.TorqueException - if retrieval of the associated objects fails
      • getPeer

        public TorqueBasicGroupPeer 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 org.apache.torque.map.TableMap getTableMap()
                                                   throws org.apache.torque.TorqueException
        Retrieves the TableMap object related to this Table data without compiler warnings of using getPeer().getTableMap().
        Returns:
        The associated TableMap object.
        Throws:
        org.apache.torque.TorqueException - if associated objects are not found
      • equals

        public boolean equals​(Object toCompare)
        Compares the primary key of this instance with the key of another.
        Overrides:
        equals in class Object
        Parameters:
        toCompare - The object to compare to.
        Returns:
        Whether the primary keys are equal and the object have the same class.
      • hashCode

        public int hashCode()
        If the primary key is not null, return the hashcode of the primary key. Otherwise calls Object.hashCode().
        Overrides:
        hashCode in class Object
        Returns:
        an int value
      • valueEquals

        public boolean valueEquals​(TorqueBasicGroup toCompare)
        Compares the content of this object to another object
        Parameters:
        toCompare - The object to compare to.
        Returns:
        true if all of the columns in the other object have the same value as the objects in this class.