|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.SIRAPRISE.typeimplementations.DbmsIntImplementation
public final class DbmsIntImplementation
The implementation for the SIRA_PRISE int type. The physical encoding of INT values consists of 4 bytes holding a java int.
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getComponentNameMap()
Gets a map of component/type names. |
ValueBuffer |
getComponentValue(java.lang.String componentName,
ScalarValueBuffer valueBuffer)
"Extracts" a possrep component value out of a value of the type |
PossRepImplementation |
getDefaultPossrepImplementation()
The default possrep is the INT possrep, consisting of a single component of type STRING |
int |
getDfltLogicalSize()
The default, min and max logical size is 1 |
static DbmsIntImplementation |
getInstance()
Gets the instance |
static int |
getIntegerFromString(java.lang.String value)
Gets The Integer of the value that value is the external representation of |
static int |
getJavaInt(ScalarValueBuffer valueBuffer)
Inspects a ScalarValueBuffer holding an integer and returns that integer |
int |
getMaxLogicalSize()
The default, min and max logical size is 1 |
int |
getMinLogicalSize()
The default, min and max logical size is 1 |
int |
getPhysicalSizeFor(int logicalSize)
The physical size of an encoding is always 4 bytes |
PossRepImplementation |
getPossrepImplementation(java.lang.String componentName)
Gets the PossrepImplementation object implementing the possrep of which the given component name names a component. |
java.util.Set<PossRepImplementation> |
getPossrepImplementations()
Gets the set of all PossRepImplementations for this type. |
java.lang.String |
getPossrepName()
Gets the possrep name |
static ScalarValueBuffer |
getValueBuffer(int i)
Returns a ScalarValueBuffer holding the given integer value |
ValueBuffer |
valueFromComponentValues(java.util.HashMap<java.lang.String,ValueBuffer> componentValueMap,
int logicalSize)
Returns a ValueBuffer holding the value of the type that this PossRepImplementation is for, and that corresponds to the component values given in the componentValueMap argument. |
ValueBuffer |
valueFromExternalRepresentation(java.lang.String value)
Convert a value of this possrep's type to internal format. |
ValueBuffer |
valueFromExternalRepresentation(java.lang.String value,
int maximumLogicalLengthAllowed)
Converts a value of this type from external to internal format, given a specified maximum allowable logical size for the value to be returned. |
java.lang.String |
valueToEscapedExternalRepresentation(ValueBuffer valueBuffer)
Converts a value in internal format to the appropriate textual representation of that value for this possrep. |
java.lang.String |
valueToExternalRepresentation(ValueBuffer valueBuffer)
Converts a value in internal format to the appropriate textual representation of that value for this possrep. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DbmsIntImplementation getInstance()
public static int getIntegerFromString(java.lang.String value)
value
- A String representing an integer value
public static int getJavaInt(ScalarValueBuffer valueBuffer)
valueBuffer
- The scalarvaluebuffer holding an integer value
public static ScalarValueBuffer getValueBuffer(int i)
i
- an integer
public java.util.Map<java.lang.String,java.lang.String> getComponentNameMap()
PossRepImplementation
getComponentNameMap
in interface PossRepImplementation
public ValueBuffer getComponentValue(java.lang.String componentName, ScalarValueBuffer valueBuffer)
PossRepImplementation
getComponentValue
in interface PossRepImplementation
componentName
- The possrep component NamevalueBuffer
- The scalarValueBuffer holding the value of which the possrep's component's value is to be extracted
public PossRepImplementation getDefaultPossrepImplementation()
getDefaultPossrepImplementation
in interface TypeImplementation
public int getDfltLogicalSize()
getDfltLogicalSize
in interface TypeImplementation
public int getMaxLogicalSize()
getMaxLogicalSize
in interface TypeImplementation
public int getMinLogicalSize()
getMinLogicalSize
in interface TypeImplementation
public int getPhysicalSizeFor(int logicalSize)
getPhysicalSizeFor
in interface TypeImplementation
logicalSize
- The logical size of a declared attribute of this type
public PossRepImplementation getPossrepImplementation(java.lang.String componentName)
TypeImplementation
getPossrepImplementation
in interface TypeImplementation
componentName
- The name of a component of some possrep of this type (and for which the corresponding PossrepImplementation object is to be returned)
public java.util.Set<PossRepImplementation> getPossrepImplementations()
TypeImplementation
getPossrepImplementations
in interface TypeImplementation
public java.lang.String getPossrepName()
PossRepImplementation
getPossrepName
in interface PossRepImplementation
public ValueBuffer valueFromComponentValues(java.util.HashMap<java.lang.String,ValueBuffer> componentValueMap, int logicalSize)
PossRepImplementation
valueFromComponentValues
in interface PossRepImplementation
componentValueMap
- A Map holding component names and their corresponding values, held in a ValueBuffer.logicalSize
- The maximum logical size that the returned value is allowed to have. This only applies to certain variable-length types. E.g. imagine that type STRING has a possrep with components LENGTH and NONBLANKS, such that the string represented by LENGTH(12)NONBLANKS(A) represents the string "A ". An InvalidValueException should be thrown if these component values are passed to this method, along with a logicalSize of, say, 8.
public ValueBuffer valueFromExternalRepresentation(java.lang.String value)
PossRepImplementation
valueFromExternalRepresentation
in interface PossRepImplementation
value
- the value in external format.
public ValueBuffer valueFromExternalRepresentation(java.lang.String value, int maximumLogicalLengthAllowed) throws InvalidValueException
PossRepImplementation
valueFromExternalRepresentation
in interface PossRepImplementation
value
- the textual representation of the value.maximumLogicalLengthAllowed
- the maximum logical length that the returned value can be allowed to have.
InvalidValueException
- If the textual representation does not represent a value of the possrep's type.public java.lang.String valueToEscapedExternalRepresentation(ValueBuffer valueBuffer)
PossRepImplementation
valueToEscapedExternalRepresentation
in interface PossRepImplementation
valueBuffer
- The value in internal format.
public java.lang.String valueToExternalRepresentation(ValueBuffer valueBuffer)
PossRepImplementation
valueToExternalRepresentation
in interface PossRepImplementation
valueBuffer
- The value in internal format.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |