Package org.apache.openjpa.conf
Class Specification
java.lang.Object
org.apache.openjpa.conf.Specification
An immutable representation of a Specification supported by OpenJPA.
Available via {@linkplain OpenJPAConfiguration#getSpecificationInstance()()}
for configuration that may depend on Specification version.
- Author:
- Pinaki Poddar
-
Constructor Summary
ConstructorsConstructorDescriptionSpecification(String fullName) Construct from a String that encodes name and version fields. -
Method Summary
Modifier and TypeMethodDescriptionintcompareVersion(Specification other) Compares major version number of the given Specification with this receiver.booleanAffirms if the given argument is equal to this receiver.Return the compatibility object associated with this Specification instance.getName()intbooleanAffirms if the given string equals name of this receiver, ignoring the case.booleanisSame(Specification other) Affirms if the given specification has the same name of this receiver, ignoring the case.voidsetCompatibility(Compatibility compatibility) Associate a compatibility object with this Specification instancesetDescription(String description) toString()
-
Constructor Details
-
Specification
Construct from a String that encodes name and version fields.- Parameters:
fullName- a encoded string in the following prescribed format.name major.minore.g.JPA 2.0-draftOnly the 'name' field is mandatory. 'major' version defaults to 1 and must be an integer. 'minor' version defaults to 0 and can be a String.
-
-
Method Details
-
getName
-
getVersion
public int getVersion() -
getMinorVersion
-
getDescription
-
setDescription
-
equals
Affirms if the given argument is equal to this receiver. -
isSame
Affirms if the given specification has the same name of this receiver, ignoring the case. -
isSame
Affirms if the given string equals name of this receiver, ignoring the case. -
compareVersion
Compares major version number of the given Specification with this receiver.- Returns:
- 0 if they are equal. > 0 if this receiver is higher version. < 0 if this receiver is lower version.
-
toString
-
setCompatibility
Associate a compatibility object with this Specification instance- Parameters:
compatibility- a Compatibility object with flags set in compliance with this Specification instance.
-
getCompatibility
Return the compatibility object associated with this Specification instance.
-