org.silverpeas.search.indexEngine.model
Class IndexEntryPK

java.lang.Object
  extended by org.silverpeas.search.indexEngine.model.IndexEntryPK
All Implemented Interfaces:
Serializable

public final class IndexEntryPK
extends Object
implements Serializable

An IndexEntryPK uniquely identify an entry in the web'activ index. An IndexEntryPK is set at the index entry creation time : when a web'activ's component adds a new element or document. This IndexEntryPK will be return later when the document matchs a query. A web'activ document is uniquely identified by :

See Also:
Serialized Form

Constructor Summary
IndexEntryPK(String componentId, String objectType, String objectId)
           
IndexEntryPK(String space, String component, String objectType, String objectId)
          Deprecated. - parameter space is no more used
 
Method Summary
static IndexEntryPK create(String s)
          Create a new IndexEntry from s.
 boolean equals(Object o)
          To be equal two IndexEntryPK must have the same four parts (space, component, type, id).
 String getComponent()
          Return the name of the component's instance which handles the object.
 String getObjectId()
          Return the object id.
 String getObjectType()
          Return the type of the indexed document.
 String getSpace()
          Deprecated. - to use this method is forbidden
 int hashCode()
          Returns the hash code of the String representation.
 String toString()
          Returns a string which can be used later to recontruct the key with the create method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexEntryPK

public IndexEntryPK(String space,
                    String component,
                    String objectType,
                    String objectId)
Deprecated. - parameter space is no more used

The constructor set in a row all the parts of the key.


IndexEntryPK

public IndexEntryPK(String componentId,
                    String objectType,
                    String objectId)
Method Detail

getSpace

public String getSpace()
Deprecated. - to use this method is forbidden

Return the space of the indexed document or the userId if the space is a private working space.


getComponent

public String getComponent()
Return the name of the component's instance which handles the object.


getObjectType

public String getObjectType()
Return the type of the indexed document. The meaning of this type is uniquely determined by the component handling the object.


getObjectId

public String getObjectId()
Return the object id.


toString

public String toString()
Returns a string which can be used later to recontruct the key with the create method.

Overrides:
toString in class Object

equals

public boolean equals(Object o)
To be equal two IndexEntryPK must have the same four parts (space, component, type, id). The equals method is redefined so IndexEntryPK objects can be put in a Set or used as Map key.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns the hash code of the String representation. The hashCode method is redefined so IndexEntryPK objects can be put in a Set or used as Map key.

Overrides:
hashCode in class Object

create

public static IndexEntryPK create(String s)
Create a new IndexEntry from s. We must have :
 create(s).toString().equals(s)
 



Copyright © 2016 Silverpeas. All Rights Reserved.