public class Property
extends java.lang.Object
Property
annotation,
avoiding this way the super cost of slow access via the slow map implementation and
sun.reflect.annotation.AnnotationInvocationHandler#hashCodeImpl
;_isCharacter
, _isDatetimeTz
)
so the callers do not need to compare the type each time;Property
annotation is processed only once. This is especially important
as some costing operations like intern()
-ing the primary string attributes happens
a single time, when the target DMO is loaded (usually at server startup);DmoMeta
. If ever needed in future it
can be easily added.
com.goldencode.p2j.persist.annotation
package.Modifier and Type | Field and Description |
---|---|
java.lang.String |
_ablType
Lowercase type of this property.
|
java.lang.Class<?> |
_fwdType
The FWD class that of the property.
|
boolean |
_isCharacter
Quick test if this property is a character (maybe add other similar).
|
boolean |
_isDatetimeTz
Quick test if this property is a character (maybe add other similar).
|
java.lang.reflect.Method |
annMethod
The method which was annotated.
|
java.lang.String |
canRead
CAN-READ option of this field.
|
java.lang.String |
canWrite
CAN-WRITE option of this field.
|
boolean |
caseSensitive
Flag the case sensitive character fields.
|
java.lang.String |
codePage
Code page of the CLOB field.
|
java.lang.String |
column
The name of the column in the SQL database, associated with the DMO property.
|
java.lang.String |
columnLabel
COLUMN-LABEL attribute of this field.
|
java.lang.String |
columnLabel_sa
COLUMN-LABEL-SA attribute of this field.
|
java.lang.String |
desc
DESCRIPTION attribute of this field.
|
int |
extent
Extent for array (extent) fields (defaults to 0 for scalar fields).
|
java.lang.String |
format
Mandatory FORMAT attribute of this field.
|
java.lang.String |
format_sa
FORMAT-SA attribute of this field.
|
java.lang.String |
help
HELP attribute of this field.
|
java.lang.String |
help_sa
HELP-SA attribute of this field.
|
int |
id
The id of this field in the sequence of the fields of the buffer.
|
int |
index
One-based index in the legacy extent field associated with a DMO property.
|
java.lang.String |
initial
INITIAL attribute of this field.
|
java.lang.String |
initial_sa
INITIAL-SA attribute of this field.
|
boolean |
initialNull
INITIAL-NULL pseudo-attribute of this field.
|
java.lang.String |
label
LABEL attribute of this field.
|
java.lang.String |
label_sa
LABEL-SA option of this table.
|
java.lang.String |
legacy
The name of the legacy field associated with the DMO property.
|
java.lang.String |
like
Name of the source field specified by LIKE option (either at the table- or field-level).
|
boolean |
mandatory
MANDATORY attribute of this field.
|
java.lang.String |
name
The name of the DMO property.
|
int |
order
Mandatory ORDER attribute from the original schema.
|
java.lang.String |
original
Original property name (not exposed in DMO) for denormalized field with extent.
|
int |
position
POSITION attribute from the original schema.
|
int |
scale
Scale for decimal fields (decimals, precision, in 4GL terms).
|
boolean |
serializeHidden
Flag indicating the field should not be included in serialized output.
|
java.lang.String |
serializeName
Name of field in serialized output.
|
java.lang.String |
validateExpression
VALIDATE-EXPRESSION attribute of this field.
|
java.lang.String |
validateMessage
VALIDATE-MESSAGE attribute of this field.
|
java.lang.String |
valmsg_sa
VALMSG-SA option of this table.
|
java.lang.String |
viewAs
VIEW-AS field property
|
int |
width
MAX-WIDTH attribute of this field.
|
java.lang.String |
xmlDataType
XML schema data type of field.
|
java.lang.String |
xmlNodeName
Name of element or attribute representing field in XML output.
|
java.lang.String |
xmlNodeType
Node type of field in XML output.
|
Constructor and Description |
---|
Property(int id,
java.lang.String name,
java.lang.String legacy,
java.lang.String column,
boolean mandatory,
java.lang.Class<?> type,
boolean initialNull,
java.lang.reflect.Method mthd)
Creates a new
Property object. |
Property(Property source,
java.lang.reflect.Method annotatedMethod)
The constructor that initialize this immutable object.
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
convertReservedNull(java.lang.String value)
Converts "reserved null" to true
null . |
private java.lang.String |
getAblType()
Computes the ABL type name from the Java type.
|
java.lang.String |
toString()
Obtain a short description of the object used in debugging.
|
public final int id
bufferField(int)
attribute of the BufferImpl
for
emulating the BUFFER-FIELD(integer)
buffer handle attribute.public final java.lang.String name
public final java.lang.String legacy
public final java.lang.String column
public final int extent
public final int index
public final java.lang.String format
public final java.lang.String format_sa
public final java.lang.String help
public final java.lang.String help_sa
public final java.lang.String initial
public final java.lang.String initial_sa
public final boolean initialNull
public final java.lang.String label
public final java.lang.String label_sa
public final java.lang.String columnLabel
public final java.lang.String columnLabel_sa
public final boolean mandatory
public final int order
public final int position
public final java.lang.String validateMessage
public final java.lang.String valmsg_sa
public final java.lang.String validateExpression
public final java.lang.String desc
public final int width
public final java.lang.String original
public final boolean caseSensitive
public final int scale
public final boolean serializeHidden
public final java.lang.String serializeName
public final java.lang.String xmlDataType
public final java.lang.String xmlNodeName
public final java.lang.String xmlNodeType
public final java.lang.String codePage
public final java.lang.String like
public final java.lang.String viewAs
public final java.lang.String canRead
public final java.lang.String canWrite
public final java.lang.String _ablType
public final java.lang.Class<?> _fwdType
public final boolean _isCharacter
public final boolean _isDatetimeTz
public final java.lang.reflect.Method annMethod
Property(Property source, java.lang.reflect.Method annotatedMethod)
source
- The Property
annotation taken from DMO interface.annotatedMethod
- The method which was annotated.Property(int id, java.lang.String name, java.lang.String legacy, java.lang.String column, boolean mandatory, java.lang.Class<?> type, boolean initialNull, java.lang.reflect.Method mthd)
Property
object. This is a constructor dedicated to building reserved properties
which are not declared in DMO interface.id
- The id of this field in the sequence of the fields of the buffer.name
- The name of the DMO property.legacy
- The name of the legacy field associated with the DMO property.column
- The name of the column in the SQL database, associated with the DMO property.mandatory
- Flag for not-null fields.type
- property typeinitialNull
- The property has null
as default value.mthd
- The getter method for this property.private java.lang.String convertReservedNull(java.lang.String value)
null
. Returns null
if the value
equals "reserved null" for Property
annotation. Otherwise
returns the value
itself.value
- Value to check.private java.lang.String getAblType()
-
is not permitted in a Java identifier.type
.public java.lang.String toString()
toString
in class java.lang.Object