|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.core.id.IntegerIDFactory
public class IntegerIDFactory
Constructor Summary | |
---|---|
IntegerIDFactory()
|
Method Summary | |
---|---|
ObjectID |
create()
Create a new ObjectID instance using this protocol. |
java.lang.String |
getDescription()
Return the description for the type of ObjectID described by this object. |
protected int |
getNextValue()
|
java.lang.String |
getProtocol()
Return the name of the protocol that this factory uses. |
ObjectID |
stringToObject(java.lang.String value)
Attempt to convert the specified string to the appropriate ObjectID instance. |
ObjectID |
stringWithoutProtocolToObject(java.lang.String value)
Attempt to convert the specified string to the appropriate ObjectID instance. |
boolean |
validate(ObjectID id)
Return whether the specified ObjectID instance is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegerIDFactory()
Method Detail |
---|
public java.lang.String getDescription()
getDescription
in interface ObjectIDFactory
protected int getNextValue()
public ObjectID create()
create
in interface ObjectIDFactory
public boolean validate(ObjectID id)
This implementation only checks whether the ObjectID is an instance of a LongID.
id
- the ID that is to be validated, and which is never null
public ObjectID stringToObject(java.lang.String value) throws InvalidIDException
stringToObject
in interface ObjectIDFactory
value
- the stringified id (the result of ObjectID.toString()
),
and should never null or zero length
InvalidIDException
- if the parser is aware of this protocol, but it is of the wrong
format for this type of ObjectID.public ObjectID stringWithoutProtocolToObject(java.lang.String value) throws InvalidIDException
IDGenerator.stringToObject(String)
method, which
must process the protocol to determine the correct parser to use. As such, it guarantees
that the parser that receives this call can assume that the protocol was equal to the
protocol returned by the parser's ObjectIDDescriptor#getProtocol()
.
stringWithoutProtocolToObject
in interface ObjectIDFactory
value
- the stringified id with the protocol and ObjectID.DELIMITER already
removed, and should never null or zero length
InvalidIDException
- if the parser is aware of this protocol, but it is of the wrong
format for this type of ObjectID.public java.lang.String getProtocol()
getProtocol
in interface ObjectIDFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |