Package org.silverpeas.core
Class WAPrimaryKey
- java.lang.Object
-
- org.silverpeas.core.WAPrimaryKey
-
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
AnswerPK
,AttachmentPK
,AxisPK
,CommentPK
,CoordinatePK
,DocumentPK
,DocumentVersionPK
,IdPK
,InfoPK
,NodeI18NPK
,QuestionContainerPK
,QuestionPK
,QuestionResultPK
,ResourceReference
,ScorePK
,SimpleDocumentPK
,TagCloudPK
,TreeNodePK
,UsedAxisPK
,ValuePK
@Deprecated(since="5.15") public abstract class WAPrimaryKey extends Object implements Serializable, Cloneable
Deprecated.The primary key for a entity bean defines:- the row id in the database
- the space
- the component name
ResourceIdentifier
but it is still used in old code.- Version:
- 1.0
- Author:
- Nicolas Eysseric
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WAPrimaryKey(String id)
Deprecated.Constructor which set only the idWAPrimaryKey(String id, String componentId)
Deprecated.Constructor which set id, space and component nameWAPrimaryKey(String id, String space, String componentName)
Deprecated.Constructor which set id, space and component nameWAPrimaryKey(String id, WAPrimaryKey pk)
Deprecated.Constructor which set the id.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description WAPrimaryKey
clone()
Deprecated.abstract boolean
equals(Object obj)
Deprecated.This method must be specialized - Check if an another object is equal to this objectString
getComponentName()
Deprecated.Get the component name of this objectString
getId()
Deprecated.Get the row id of this objectString
getInstanceId()
Deprecated.String
getRootTableName()
Deprecated.Return the object root table nameString
getSpace()
Deprecated.Get the space of this objectString
getSpaceId()
Deprecated.String
getTableName()
Deprecated.Get the database table name where the object is storedString
getTableName(String space, String componentName)
Deprecated.Get the database table name where the object is stored rootTableName (ex : ED1KmeliaPublication)int
hashCode()
Deprecated.Returns a hash code for the keyvoid
setComponentName(String componentName)
Deprecated.Set the component name of this objectvoid
setId(String val)
Deprecated.Set the row id of this objectvoid
setSpace(String space)
Deprecated.Set the space of this objectResourceReference
toResourceReference()
Deprecated.String
toString()
Deprecated.Converts the contents of the key into a readable String.
-
-
-
Field Detail
-
id
protected String id
Deprecated.The row id in the table defined by getTableName()- Since:
- 1.0
- See Also:
getTableName()
-
space
protected String space
Deprecated.The space where is implemented the entity- Since:
- 1.0
-
componentName
protected String componentName
Deprecated.The component name in the space- Since:
- 1.0
-
-
Constructor Detail
-
WAPrimaryKey
public WAPrimaryKey(String id)
Deprecated.Constructor which set only the id- Parameters:
id
- the unique identifier value- Since:
- 1.0
-
WAPrimaryKey
public WAPrimaryKey(String id, String space, String componentName)
Deprecated.Constructor which set id, space and component name- Parameters:
id
- the unique identifier valuespace
- the space identifiercomponentName
- the component instance identifier- Since:
- 1.0
-
WAPrimaryKey
public WAPrimaryKey(String id, String componentId)
Deprecated.Constructor which set id, space and component name- Parameters:
id
- the unique identifier valuecomponentId
- the component instance identifier- Since:
- 1.0
-
WAPrimaryKey
public WAPrimaryKey(String id, WAPrimaryKey pk)
Deprecated.Constructor which set the id. The WAPrimaryKey provides space and component instance identifiers.- Parameters:
id
- the unique identifier valuepk
- another primary key from which is taken the space and component instance identifiers.- Since:
- 1.0
-
-
Method Detail
-
toResourceReference
public ResourceReference toResourceReference()
Deprecated.
-
equals
public abstract boolean equals(Object obj)
Deprecated.This method must be specialized - Check if an another object is equal to this object
-
getRootTableName
public String getRootTableName()
Deprecated.Return the object root table name- Returns:
- the root table name of the object (exemple : Publication, Node, ...)
- Since:
- 1.0
-
getId
public String getId()
Deprecated.Get the row id of this object- Returns:
- the id
- Since:
- 1.0
-
setId
public void setId(String val)
Deprecated.Set the row id of this object- Parameters:
val
- the row id- Since:
- 1.0
-
getSpace
public String getSpace()
Deprecated.Get the space of this object- Returns:
- the space
- Since:
- 1.0
-
setSpace
public void setSpace(String space)
Deprecated.Set the space of this object- Parameters:
space
- the space- Since:
- 1.0
-
getComponentName
public String getComponentName()
Deprecated.Get the component name of this object- Returns:
- the component name
- Since:
- 1.0
-
setComponentName
public void setComponentName(String componentName)
Deprecated.Set the component name of this object- Parameters:
componentName
- the component name- Since:
- 1.0
-
getTableName
public String getTableName()
Deprecated.Get the database table name where the object is stored- Returns:
- the database table name where the object is stored : space + componentName + rootTableName (ex : ED1KmeliaPublication)
- Since:
- 1.0
- See Also:
getRootTableName()
-
getTableName
public String getTableName(String space, String componentName)
Deprecated.Get the database table name where the object is stored rootTableName (ex : ED1KmeliaPublication)- Parameters:
space
- a space namecomponentName
- a component name- Returns:
- the database table name where the object is stored : space + componentName +
- Since:
- 1.0
-
toString
public String toString()
Deprecated.Converts the contents of the key into a readable String.
-
hashCode
public int hashCode()
Deprecated.Returns a hash code for the key
-
getSpaceId
public String getSpaceId()
Deprecated.
-
getInstanceId
public String getInstanceId()
Deprecated.
-
clone
public WAPrimaryKey clone()
Deprecated.
-
-