public final class BufferFieldImpl extends HandleChain implements BufferField, Deletable
FieldReference
as a delegate worker.Modifier and Type | Field and Description |
---|---|
private character |
admData
Corresponds to ADM-DATA attribute.
|
private FieldReference |
fieldRef
FieldReference delegate object |
private static java.util.logging.Logger |
LOG
Logger
|
private integer |
uniqueID
Corresponds to UNIQUE-ID attribute.
|
name, nextSibling, prevSibling
instProc
Modifier | Constructor and Description |
---|---|
|
BufferFieldImpl(DataModelObject dmo,
java.lang.String property)
Create a new field reference given a DMO proxy and property name.
|
private |
BufferFieldImpl(DataModelObject dmo,
java.lang.String property,
boolean uppercase,
NumberType index)
Create a new field reference given a DMO proxy, a property name, and
an index for the property.
|
private |
BufferFieldImpl(FieldReference fieldRef,
int index)
Create an instance of this class which accesses a specific element of an extent field,
given a field reference for the same DMO property, which does not reference a specific
element of that field.
|
Modifier and Type | Method and Description |
---|---|
handle |
bufferHandle()
Returns the handle of the buffer object to which the buffer-field belongs.
|
character |
bufferName()
Conversion of BUFFER-NAME attribute (KW_BUF_NAME).
|
logical |
caseSensitive()
Getter of CASE-SENSITIVE attribute.
|
void |
changeColumnLabel(character columnLabel)
Conversion of COLUMN-LABEL attribute (KW_COL_LAB).
|
void |
changeLiteralQuestion(logical literalQuestion)
Conversion of LITERAL-QUESTION attribute (KW_LIT_QSTN).
|
void |
changeValidateExpression(character validateExpression)
Conversion of VALIDATE-EXPRESSION attribute (KW_VAL_EXPR).
|
void |
changeValidateMessage(character validateMessage)
Conversion of VALIDATE-MESSAGE attribute (KW_VAL_MSG).
|
void |
changeValue(int index,
java.lang.Object newValue)
Conversion of BUFFER-VALUE attribute (KW_BUF_VAL).
|
private void |
changeValue(int index,
java.lang.Object newValue,
boolean validate)
Change the value of a specific element of an extent field, optionally validating the
supplied subscript.
|
void |
changeValue(NumberType index,
java.lang.Object newValue)
Conversion of BUFFER-VALUE attribute (KW_BUF_VAL).
|
void |
changeValue(java.lang.Object newValue)
Conversion of BUFFER-VALUE attribute (KW_BUF_VAL).
|
private boolean |
checkUnknown(java.lang.String attributeName,
BaseDataType value)
Check if the provided value of the attribute is unknown and raise error in this case.
|
character |
columnLabel()
Conversion of COLUMN-LABEL attribute (KW_COL_LAB).
|
integer |
extent()
Conversion of EXTENT attribute (KW_EXTENT).
|
character |
getADMData()
Get the value of the ADM-DATA attribute.
|
character |
getColumnLabel()
Getter of COLUMN-LABEL attribute.
|
character |
getDataType()
Returns the value of the DATA-TYPE attribute
|
character |
getDbName()
Returns the state of the DBNAME attribute
|
private Buffer |
getDMOProxy()
Get the DMO proxy which references parent buffer.
|
character |
getFormat()
Getter of FORMAT attribute.
|
decimal |
getHeightChars()
HEIGHT-CHARS attribute is not defined for BUFFER-FIELD handle.
|
integer |
getHeightPixels()
HEIGHT-PIXELS attribute is not defined for BUFFER-FIELD handle.
|
character |
getLabel()
Returns the value of the LABEL attribute
|
private RecordBuffer |
getParentBuffer()
Get the parent record buffer.
|
private java.lang.String |
getProperty()
Get the property name of this field.
|
character |
getTable()
Returns the state of the TABLE attribute
|
integer |
getUniqueID()
Gets the the unique ID number associated to this object by the underlying system.
|
decimal |
getWidthChars()
Get the WIDTH-CHARS attribute of this BUFFER-FIELD handle.
|
integer |
getWidthPixels()
WIDTH-PIXELS attribute is not defined for BUFFER-FIELD handle.
|
protected boolean |
hasNextSibling()
Check if this resource supports the NEXT-SIBLING attribute.
|
protected boolean |
hasPrevSibling()
Check if this resource supports the PREV-SIBLING attribute.
|
character |
initial()
Conversion of INITIAL attribute (KW_INIT).
|
logical |
literalQuestion()
Conversion of LITERAL-QUESTION attribute (KW_LIT_QSTN).
|
logical |
mandatory()
Conversion of MANDATORY attribute (KW_MAND).
|
character |
name()
Get the
name attribute of a BUFFER-FIELD, which is the legacy name of the
field referenced by this object. |
integer |
position()
Gets the read-only POSITION attribute.
|
protected boolean |
resourceDelete()
Delete the resource.
|
void |
setADMData(character value)
Set the value of the ADM-DATA attribute.
|
void |
setADMData(java.lang.String value)
Set the value of the ADM-DATA attribute.
|
void |
setColumnLabel(character columnLabel)
Setter of COLUMN-LABEL attribute.
|
void |
setColumnLabel(java.lang.String columnLabel)
Setter of COLUMN-LABEL attribute.
|
void |
setDataType(character dataType)
Set the
DATA-TYPE attribute.. |
void |
setDataType(java.lang.String dataType)
Set the
DATA-TYPE attribute.. |
void |
setFormat(character format)
Setter of FORMAt attribute.
|
void |
setFormat(java.lang.String format)
Setter of FORMAt attribute.
|
void |
setHeightChars(double h)
HEIGHT-CHARS attribute is not defined for BUFFER-FIELD handle.
|
void |
setHeightChars(NumberType h)
HEIGHT-CHARS attribute is not defined for BUFFER-FIELD handle.
|
void |
setHeightPixels(int heightPixels)
HEIGHT-PIXELS attribute is not defined for BUFFER-FIELD handle.
|
void |
setHeightPixels(NumberType heightPixels)
HEIGHT-PIXELS attribute is not defined for BUFFER-FIELD handle.
|
void |
setLabel(character label)
Set the
LABEL attribute of handle. |
void |
setLabel(java.lang.String label)
Set the
LABEL attribute of handle. |
void |
setWidthChars(double widthChars)
Set the WIDTH-CHARS attribute of this BUFFER-FIELD handle.
|
void |
setWidthChars(NumberType widthChars)
Set the WIDTH-CHARS attribute of this BUFFER-FIELD handle.
|
void |
setWidthPixels(int widthPixels)
WIDTH-PIXELS attribute is not defined for BUFFER-FIELD handle.
|
void |
setWidthPixels(NumberType widthPixels)
WIDTH-PIXELS attribute is not defined for BUFFER-FIELD handle.
|
character |
stringValue()
Conversion of STRING-VALUE attribute (KW_STR_VAL).
|
character |
stringValue(int index)
Conversion of STRING-VALUE attribute (KW_STR_VAL).
|
character |
stringValue(NumberType index)
Conversion of STRING-VALUE attribute (KW_STR_VAL).
|
boolean |
valid()
Reports if this object is valid for use.
|
private boolean |
validateBufferFieldIndex(int index)
Validate the index passed to a BUFFER-VALUE method call.
|
private boolean |
validateBufferFieldIndex(NumberType index)
Validate the index passed to a BUFFER-VALUE method call.
|
character |
validateExpression()
Conversion of VALIDATE-EXPRESSION attribute (KW_VAL_EXPR).
|
character |
validateMessage()
Conversion of VALIDATE-MESSAGE attribute (KW_VAL_MSG).
|
BaseDataType |
value()
Conversion of BUFFER-VALUE attribute (KW_BUF_VAL).
|
BaseDataType |
value(int index)
Conversion of BUFFER-VALUE attribute (KW_BUF_VAL).
|
private BaseDataType |
value(int index,
boolean validate)
Retrieve the value of a specific element of an extent field, optionally validating the
supplied subscript.
|
BaseDataType |
value(NumberType index)
Conversion of BUFFER-VALUE attribute (KW_BUF_VAL).
|
delete, firstResource, firstResource, getHead, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameReadOnly, hasParent, hasPrivateData, interlink, isChained, lastResource, lastResource, moveInChain, name, name, readOnlyError, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData
getResourceType, id, id, implicitDeletion, instantiatingProcedure, invalidAttribute, setInstantiatingProcedure, type, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
id, id, unknown
getResourceType
private static final java.util.logging.Logger LOG
private final FieldReference fieldRef
FieldReference
delegate objectprivate final character admData
private final integer uniqueID
public BufferFieldImpl(DataModelObject dmo, java.lang.String property)
dmo
- DMO proxy.property
- Target property name.private BufferFieldImpl(DataModelObject dmo, java.lang.String property, boolean uppercase, NumberType index)
dmo
- DMO proxy.property
- Target property name.uppercase
- true
to force a character
value to be
uppercased/right-trimmed;
false
to leave the result unchanged.index
- Index to pass to property's getter method at resolve time.java.lang.IllegalArgumentException
- if field reference is not recognized.private BufferFieldImpl(FieldReference fieldRef, int index)
fieldRef
- A reference to an extent field, which does not have an index into a specific
element.index
- A one-based index into an extent field.public character name()
name
attribute of a BUFFER-FIELD, which is the legacy name of the
field referenced by this object.name
in interface Nameable
name
in class HandleChain
public integer extent()
extent
in interface BufferField
public character initial()
initial
in interface BufferField
public character stringValue()
stringValue
in interface BufferField
public character stringValue(int index)
stringValue
in interface BufferField
index
- An integer expression representing a subscript, for fields that
have extents.public character stringValue(NumberType index)
stringValue
in interface BufferField
index
- An integer expression representing a subscript, for fields that
have extents.public BaseDataType value(int index)
value
in interface BufferField
index
- An INTEGER expression representing a subscript, for fields
that have extents.public BaseDataType value(NumberType index)
value
in interface BufferField
index
- An INTEGER expression representing a subscript, for fields
that have extents.unknown
if it is a scalar one.public void changeValue(int index, java.lang.Object newValue)
changeValue
in interface BufferField
index
- An INTEGER expression representing a subscript, for fields
that have extents.newValue
- New value of a buffer-field object.public void changeValue(NumberType index, java.lang.Object newValue)
changeValue
in interface BufferField
index
- An INTEGER expression representing a subscript, for fields
that have extents.newValue
- New value of a buffer-field object.public BaseDataType value()
value
in interface BufferField
unknown
value is returned.public void changeValue(java.lang.Object newValue)
Setter of current value of a buffer-field object. If you modify the BUFFER-VALUE attribute, Progress sets the buffer-field object to the new value.
Special care is taken when the field is a CHARACTER and the LITERAL-QUESTION is the default
value false
; in this case the
BUFFER-VALUE
specification does not mention any thing about the
string length, and also upholds that enclosing quotes are removed. The current
implementation reflects the 4GL's behaviour obtained by manual testing.yes
the string are not affected.changeValue
in interface BufferField
newValue
- New value of a buffer-field object.public character columnLabel()
public void changeColumnLabel(character columnLabel)
columnLabel
- New value of a attribute.public character bufferName()
bufferName
in interface BufferField
public handle bufferHandle()
bufferHandle
in interface BufferField
public logical literalQuestion()
literalQuestion
in interface BufferField
public void changeLiteralQuestion(logical literalQuestion)
changeLiteralQuestion
in interface BufferField
literalQuestion
- New value of LITERAL-QUESTION attribute.public character validateMessage()
validateMessage
in interface BufferField
public void changeValidateMessage(character validateMessage)
changeValidateMessage
in interface BufferField
validateMessage
- New value of VALIDATE-MESSAGE attribute.public logical mandatory()
mandatory
in interface BufferField
public integer position()
position
in interface BufferField
public character validateExpression()
validateExpression
in interface BufferField
public void changeValidateExpression(character validateExpression)
changeValidateExpression
in interface BufferField
validateExpression
- New value of VALIDATE-EXPRESSION attribute.public boolean valid()
valid
in interface WrappedResource
true
if we are valid (can be used).public character getDbName()
getDbName
in interface DatabaseInfo
public character getTable()
getTable
in interface DatabaseInfo
public decimal getHeightChars()
HandleResource.invalidAttribute(java.lang.String)
to display appropriate error.getHeightChars
in interface Sizeable
public void setHeightChars(NumberType h)
HandleChain.readOnlyError(java.lang.String)
to display appropriate error.setHeightChars
in interface Sizeable
h
- Not used.public void setHeightChars(double h)
HandleChain.readOnlyError(java.lang.String)
to display appropriate error.setHeightChars
in interface Sizeable
h
- Not used.public decimal getWidthChars()
getWidthChars
in interface Sizeable
public void setWidthChars(NumberType widthChars)
setWidthChars
in interface Sizeable
widthChars
- The new value for the WIDTH-CHARS attribute.public void setWidthChars(double widthChars)
setWidthChars
in interface Sizeable
widthChars
- The new value for the WIDTH-CHARS attribute.public integer getWidthPixels()
HandleResource.invalidAttribute(java.lang.String)
to display appropriate error.getWidthPixels
in interface Sizeable
public void setWidthPixels(NumberType widthPixels)
HandleChain.readOnlyError(java.lang.String)
to display appropriate error.setWidthPixels
in interface Sizeable
widthPixels
- Not used.public void setWidthPixels(int widthPixels)
HandleChain.readOnlyError(java.lang.String)
to display appropriate error.setWidthPixels
in interface Sizeable
widthPixels
- Not used.public integer getHeightPixels()
HandleResource.invalidAttribute(java.lang.String)
to display appropriate error.getHeightPixels
in interface Sizeable
public void setHeightPixels(NumberType heightPixels)
HandleChain.readOnlyError(java.lang.String)
to display appropriate error.setHeightPixels
in interface Sizeable
heightPixels
- Not used.public void setHeightPixels(int heightPixels)
HandleChain.readOnlyError(java.lang.String)
to display appropriate error.setHeightPixels
in interface Sizeable
heightPixels
- Not used.public character getFormat()
getFormat
in interface CommonField
public void setFormat(java.lang.String format)
setFormat
in interface CommonField
format
- The new value.public void setFormat(character format)
setFormat
in interface CommonField
format
- The new value.public character getColumnLabel()
getColumnLabel
in interface CommonField
public void setColumnLabel(character columnLabel)
setColumnLabel
in interface CommonField
columnLabel
- New value of a attribute.public void setColumnLabel(java.lang.String columnLabel)
setColumnLabel
in interface CommonField
columnLabel
- New value of a attribute.public character getDataType()
getDataType
in interface CommonField
public void setDataType(java.lang.String dataType)
DATA-TYPE
attribute..setDataType
in interface CommonField
dataType
- The DATA-TYPE to be set.public void setDataType(character dataType)
DATA-TYPE
attribute..setDataType
in interface CommonField
dataType
- The DATA-TYPE to be set.public character getLabel()
getLabel
in interface CommonField
public void setLabel(java.lang.String label)
LABEL
attribute of handle.setLabel
in interface CommonField
label
- The LABEL to be set.public void setLabel(character label)
LABEL
attribute of handle.setLabel
in interface CommonField
label
- The LABEL to be set.public character getADMData()
getADMData
in interface ADMData
public void setADMData(java.lang.String value)
setADMData
in interface ADMData
value
- The new value.public void setADMData(character value)
setADMData
in interface ADMData
value
- The new value.public integer getUniqueID()
getUniqueID
in interface UniqueID
public logical caseSensitive()
caseSensitive
in interface BufferField
protected boolean resourceDelete()
resourceDelete
in class HandleChain
true
if the resource was deleted.protected boolean hasPrevSibling()
hasPrevSibling
in class HandleChain
false
.protected boolean hasNextSibling()
hasNextSibling
in class HandleChain
false
.private BaseDataType value(int index, boolean validate)
index
- One-based subscript of the extent field to be changed.validate
- true
to validate index
, else false
.private void changeValue(int index, java.lang.Object newValue, boolean validate)
index
- One-based subscript of the extent field to be changed.newValue
- New value to set into the extent field.validate
- true
to validate index
, else false
.private Buffer getDMOProxy()
private boolean validateBufferFieldIndex(NumberType index)
index
- Index value (unadjusted) provided by converted business logic.true
if index
is valid, else false
.ErrorConditionException
- if index
is invalid and session is not in silent error mode.private boolean validateBufferFieldIndex(int index)
index
- Index value (unadjusted) provided by converted business logic, or -1
if that value was unknown.true
if index
is valid, else false
.ErrorConditionException
- if index
is invalid and session is not in silent error mode.private boolean checkUnknown(java.lang.String attributeName, BaseDataType value)
attributeName
- Name of the attribute which value is checked.value
- Value of the attribute to be checked.false
if the value is unknown.private RecordBuffer getParentBuffer()
private java.lang.String getProperty()