|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.security.torque.TorqueObject
All the Torque Security objects (User, Group, Role, Permission) are derived from this class which contains the base compare and management methods for all security objects.
Field Summary | |
protected org.apache.torque.om.Persistent |
obj
The underlying database Object which is proxied |
Constructor Summary | |
TorqueObject()
Constructs a new TorqueObject |
|
TorqueObject(org.apache.torque.om.Persistent obj)
This Constructor is used when a Manager has retrieved a list of Database Objects from the peer and must 'wrap' them into TorqueObjects. |
|
TorqueObject(java.lang.String name)
Constructs a new Object with the specified name. |
Method Summary | |
int |
compareTo(java.lang.Object obj)
Used for ordering TorqueObjects. |
boolean |
equals(java.lang.Object obj)
Compares this with another BaseObject instance. |
boolean |
equals(TorqueObject torqueObject)
Compares the primary key of this instance with the key of another. |
abstract java.lang.String |
getName()
Returns the name of this object |
abstract org.apache.torque.om.Persistent |
getPersistentObj()
Returns the underlying Object for the Peer |
org.apache.torque.om.ObjectKey |
getPrimaryKey()
getter for the object primaryKey. |
int |
hashCode()
If the primary key is not null , return the hashcode of the
primary key. |
boolean |
isModified()
Returns whether the object has been modified, since it was last retrieved from storage. |
boolean |
isNew()
Returns whether the object has ever been saved. |
abstract void |
save()
Makes changes made to the TorqueObject permanent. |
void |
save(java.sql.Connection con)
Stores the object in the database. |
void |
save(java.lang.String torqueName)
Stores the object in the database. |
void |
setModified(boolean m)
Sets the modified state for the object. |
abstract void |
setName(java.lang.String name)
Sets the name of this object |
void |
setNew(boolean b)
Setter for the isNew attribute. |
void |
setPrimaryKey(org.apache.torque.om.ObjectKey primaryKey)
Sets the PrimaryKey for the object. |
void |
setPrimaryKey(java.lang.String primaryKey)
Sets the PrimaryKey for the object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.turbine.om.security.SecurityEntity |
getId, getIdAsObj, setId |
Field Detail |
protected org.apache.torque.om.Persistent obj
Constructor Detail |
public TorqueObject()
public TorqueObject(java.lang.String name)
name
- The name of the new object.public TorqueObject(org.apache.torque.om.Persistent obj)
obj
- An Object from the peerMethod Detail |
public abstract org.apache.torque.om.Persistent getPersistentObj()
public abstract java.lang.String getName()
getName
in interface SecurityEntity
public abstract void setName(java.lang.String name)
setName
in interface SecurityEntity
name
- The name of the objectpublic org.apache.torque.om.ObjectKey getPrimaryKey()
getPrimaryKey
in interface org.apache.torque.om.Persistent
public void setPrimaryKey(org.apache.torque.om.ObjectKey primaryKey) throws java.lang.Exception
setPrimaryKey
in interface org.apache.torque.om.Persistent
primaryKey
- The new PrimaryKey for the object.
java.lang.Exception
- This method might throw an exceptionspublic void setPrimaryKey(java.lang.String primaryKey) throws java.lang.Exception
setPrimaryKey
in interface org.apache.torque.om.Persistent
primaryKey
- the String should be of the form produced by
ObjectKey.toString().
java.lang.Exception
- This method might throw an exceptionspublic boolean isModified()
isModified
in interface org.apache.torque.om.Persistent
public boolean isNew()
isNew
in interface org.apache.torque.om.Persistent
public void setNew(boolean b)
setNew
in interface org.apache.torque.om.Persistent
b
- the state of the object.public void setModified(boolean m)
setModified
in interface org.apache.torque.om.Persistent
m
- The new modified state for the object.public void save(java.lang.String torqueName) throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
torqueName
- The name under which the object should be stored.
java.lang.Exception
- This method might throw an exceptionspublic void save(java.sql.Connection con) throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
con
- A Connection object to save the object
java.lang.Exception
- This method might throw an exceptionspublic abstract void save() throws TurbineSecurityException
save
in interface org.apache.torque.om.Persistent
TurbineSecurityException
- if there is a problem while
saving data.public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- The Object to compare to.
public boolean equals(java.lang.Object obj)
BaseObject
instance. If
obj
is an instance of BaseObject
, delegates to
equals(BaseObject)
. Otherwise, returns false
.
obj
- The object to compare to.
public boolean equals(TorqueObject torqueObject)
torqueObject
- The TorqueObject to compare to.
public int hashCode()
null
, return the hashcode of the
primary key. Otherwise calls Object.hashCode()
.
int
value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |