|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.datamodel.id.impl.IdImpl
public class IdImpl
default implementation of SMILA record IDs.
| Constructor Summary | |
|---|---|
IdImpl(java.lang.String sourceName,
Key sourceKey)
create new Id. |
|
IdImpl(java.lang.String sourceName,
Key sourceKey,
java.util.List<KeyImpl> newElementKeys,
java.util.List<java.lang.String> newFragmentNames)
create a complete Id with optional element keys and fragment names. |
|
| Method Summary | |
|---|---|
Id |
createCompoundId()
create a new Id for the containing compund of this Id. |
Id |
createElementId(Key elementKey)
create a new Id from this Id by adding a container element key. |
Id |
createElementId(java.lang.String elementName)
create a new Id from this Id by adding a simple unnamed container element key. |
Id |
createFragmentId(java.lang.String fragmentName)
create a new Id from this Id by adding a fragment name. |
boolean |
equals(java.lang.Object obj)
|
java.util.List<? extends Key> |
getElementKeys()
get the list of container element keys. |
java.util.List<java.lang.String> |
getFragmentNames()
get the list of fragment names. |
java.lang.String |
getIdHash()
Create a hash string for this Id that can be used by databases as simple primary key. |
Key |
getKey()
key of the source object with respect to the data source configuration. |
java.lang.String |
getSource()
name of the data source containing the object. |
boolean |
hasElementKeys()
check if this Id contains element keys. |
boolean |
hasFragmentNames()
check if this Id contains fragment names. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IdImpl(java.lang.String sourceName,
Key sourceKey)
sourceName - data source namesourceKey - source object key
public IdImpl(java.lang.String sourceName,
Key sourceKey,
java.util.List<KeyImpl> newElementKeys,
java.util.List<java.lang.String> newFragmentNames)
sourceName - data source namesourceKey - name-value mapping for keynewElementKeys - container element keys. can be null or empty for non-container-element IdsnewFragmentNames - fragment names, can be null or empty for non-fragment Ids| Method Detail |
|---|
public java.lang.String getSource()
getSource in interface IdId.getSource()public Key getKey()
getKey in interface IdId.getKey()public boolean hasElementKeys()
hasElementKeys in interface IdId.hasElementKeys()public java.util.List<? extends Key> getElementKeys()
getElementKeys in interface IdId.getElementKeys()public boolean hasFragmentNames()
hasFragmentNames in interface IdId.hasFragmentNames()public java.util.List<java.lang.String> getFragmentNames()
getFragmentNames in interface IdId.getFragmentNames()
public Id createElementId(java.lang.String elementName)
throws IdHandlingException
createElementId in interface IdelementName - the key value of the container element
IdHandlingException - if this cannot be extended with element keys, because it contains fragment names already.Id.createElementId(java.lang.String)
public Id createElementId(Key elementKey)
throws IdHandlingException
createElementId in interface IdelementKey - the container element key
IdHandlingException - if this cannot be extended with element keys, because it contains fragment names already.Id.createElementId(org.eclipse.smila.datamodel.id.Key)public Id createFragmentId(java.lang.String fragmentName)
createFragmentId in interface IdfragmentName - name of the fragment
Id.createFragmentId(java.lang.String)
public Id createCompoundId()
throws IdHandlingException
createCompoundId in interface IdIdHandlingException - if this is not a compund part Id.Id.createCompoundId()public java.lang.String getIdHash()
getIdHash in interface IdId.getIdHash()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||