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,TagCloudPK,TreeNodePK,UsedAxisPK,ValuePK
@Deprecated(since="5.15") public abstract class WAPrimaryKey extends Object implements Serializable, Cloneable
Deprecated.The primary key for an entity bean defines:- the row id in the database
- the space
- the component name
ResourceIdentifierbut it is still used in old code.- Version:
- 1.0
- Author:
- Nicolas Eysseric
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWAPrimaryKey(String id)Deprecated.Constructor which set only the idprotectedWAPrimaryKey(String id, String componentId)Deprecated.Constructor which set id, space and component nameprotectedWAPrimaryKey(String id, String space, String componentName)Deprecated.Constructor which set id, space and component nameprotectedWAPrimaryKey(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 WAPrimaryKeyclone()Deprecated.abstract booleanequals(Object obj)Deprecated.This method must be specialized - Check if another object is equal to this objectStringgetComponentName()Deprecated.Get the component name of this objectStringgetId()Deprecated.Get the row id of this objectStringgetInstanceId()Deprecated.StringgetRootTableName()Deprecated.Return the object root table nameStringgetSpace()Deprecated.Get the space of this objectStringgetSpaceId()Deprecated.StringgetTableName()Deprecated.Get the database table name where the object is storedStringgetTableName(String space, String componentName)Deprecated.Get the database table name where the object is stored rootTableName (ex : ED1KmeliaPublication)inthashCode()Deprecated.Returns a hash code for the keyvoidsetComponentName(String componentName)Deprecated.Set the component name of this objectvoidsetId(String val)Deprecated.Set the row id of this objectvoidsetSpace(String space)Deprecated.Set the space of this objectResourceReferencetoResourceReference()Deprecated.StringtoString()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
protected WAPrimaryKey(String id)
Deprecated.Constructor which set only the id- Parameters:
id- the unique identifier value- Since:
- 1.0
-
WAPrimaryKey
protected 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
protected 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
protected 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 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.
-
-