public abstract class MboValue extends java.lang.Object implements MboConstants
ALLROWS, CHANGEDBY_USER, COUNT_ADDITIONS, COUNT_AFTERSAVE, COUNT_DATABASE, COUNT_DELETED, COUNT_EXISTING, DBCONFIG, DELAYVALIDATION, DELAYVALIDATIONONLY, DISCARDABLE, GOTCOMPLETEWHERE, HIDDEN, NO_RELATEDMBOS_OF_OWNERSCHILDREN_FETCH, NOACCESSCHECK, NOACTION, NOADD, NOCOMMIT, NODELETE, NONE, NOOVERWRITE, NOSAVE, NOSETVALUE, NOUPDATE, NOVALIDATION, NOVALIDATION_AND_NOACTION, NOVALIDATION_AND_NOACTION_ALLOWCROSSOVER, READONLY, REBUILD, REQUIRED, SAMEVALUEVALIDATION, SETBYPARENT, USER| Constructor and Description |
|---|
MboValue() |
| Modifier and Type | Method and Description |
|---|---|
void |
_setValueNull()
Set a field value to null.
|
void |
addMboValueListener(MboValueListener l)
Register a listener to the MboValue
|
void |
autoKey()
Generate an autokey value for this field.
|
void |
autoKeyByMboSiteOrg()
Set the autokey based on the mbo's site, not insert set.
|
void |
checkFieldAccess(long accessModifier)
Check the access control and the specified access modifier.
|
void |
construct(Mbo mbo,
MboValueInfo mvInfo)
Construct and link to the Mbo
|
void |
generateUniqueID()
Generate an ID that is unique within the table of this column.
|
ApplicationError |
getApplicationError()
Returns the ApplicationError associated witht he MboValue.
|
java.lang.String[] |
getAppLink()
Return the application name for the application link.
|
java.lang.String |
getAttributeName()
What is this field's name in the database ?
|
boolean |
getBoolean()
Return the field value as a boolean
This will be sensitive to locale, so if the field contains a 'J' and the locale
is set to German, this will return true.
|
byte |
getByte()
Get the value as a byte.
|
byte[] |
getBytes()
Get the value as a byte array.
|
java.lang.String |
getColumnTitle()
Get column title.
|
java.lang.String |
getCurProcessValue()
get the incoming value which was attempted to be saved.
|
long |
getCurrentFieldAccess()
Get what the current field access modifiers are.
|
MaxType |
getCurrentValue()
Return the current field value as a MaxType object
|
java.util.Date |
getDate()
Get the value as a date.
|
java.lang.String |
getDefault()
Return the default value used in this field.
|
double |
getDouble()
Get the value as a double.
|
void |
getFieldFlagFromMbo(long flag)
The field flags such as readonly and required will be fetched from the MBO to the
MboValue if exists.
|
long |
getFlags()
Return all the flags
|
float |
getFloat()
Get the value as a float.
|
MaxType |
getInitialValue()
Return the initial field value as a MaxType object
|
int |
getInt()
Get the value as a integer.
|
ServiceRemote |
getIntegrationService()
Convenience Method for getting the IntegrationServiceRemote.
|
int |
getLength()
How long is it ? Only useful for String and GL types
|
MboSetRemote |
getList()
Give a list of possible values to the user
|
java.util.Vector<MboValueListener> |
getListeners() |
long |
getLong()
Get the value as a long.
|
java.lang.String |
getLookupName()
Return the lookup name.
|
java.lang.String |
getMatchingAttr()
Get the attribute in the lookup table which matches this field.
|
java.lang.String |
getMatchingAttr(java.lang.String sourceObjectName)
Get the attribute in the lookup table which matches this field.
|
MaxType |
getMaxType()
Get a clone of the MaxType object of the current MboValue.
|
Mbo |
getMbo()
Get the related Mbo for this field.
|
MboValueData |
getMboValueData()
Return the MboValueData for this field.
|
MboValueData |
getMboValueData(boolean ignoreFieldFlags) |
MboValueInfo |
getMboValueInfo()
Returns the MboValueInfo associated with the attribute
|
MXException |
getMXException()
Return the mxException
|
java.lang.String |
getName()
What is this field's name ?
|
MaxType |
getPreviousValue()
Return the previous field value as a MaxType object
|
int |
getScale()
If field is a decimal, what is it's scale ?
|
java.lang.String |
getString()
Get the field value as a string representation.
|
abstract int |
getType()
Return a numeric value for the type.
|
boolean |
hasFieldAccess(long accessModifier)
Check the access control and the specified access modifier.
|
boolean |
hasList()
Has this field got a lookup list ?
|
boolean |
hasLongDescription()
does it has a long description
|
void |
init()
Called by the frame work once to allow expensive initilization
of access information.
|
void |
initValue()
Called by the frame work once to allow expensive initialization
of the initial value.
|
boolean |
isApplicationRequired()
Return whether or not the application has marked this field as conditional required
|
boolean |
isExtended()
Is the field an extended field ? i.e.
|
boolean |
isFlagSet(long flag)
Return the state of the specified flag
|
boolean |
isGuaranteedUnique()
Is the value being set guarenteed to be unique ?
|
boolean |
isHidden()
Is the field hidden ?
|
boolean |
isModified()
Has the field been modified ?
If calling this from a validate routine, may return false as the
value has not yet been changed.
|
boolean |
isNull()
Is the field null ?
|
boolean |
isPersistent()
Is the field persistent ? i.e.
|
boolean |
isReadOnly()
Is the field read only ?
|
boolean |
isRequired()
Is this field required before it can be saved to stroage ?
|
boolean |
isToBeValidated()
Returns the value of the internal toBeValidated boolean.
|
void |
removeMboValueListener(MboValueListener l)
Remove a listener to the MboValue
|
void |
resetCurrentFieldAccess()
Resets the current access modifiers to NONE
|
void |
rollbackToCheckpoint()
Reverts to the saved value.
|
void |
setApplicationError(ApplicationError appError)
This method will set the passed in ApplicationError on the MboValue.
|
void |
setApplicationRequired(boolean appRequired)
Allows the application to flag this attribute as conditionally required or not
|
void |
setBypassOperatorCheck(boolean val)
Used in special circumstances when a key value needs to have a value that
normally would be prohibited by FldMboKey EXPRLIST.
|
void |
setCurProcessValue(java.lang.String value)
Sets the incoming value which was attempted to be saved.
|
void |
setCurrentFieldAccess(long access)
Set the curent field access modifiers.
|
void |
setDefault(java.lang.String val)
Allow the user to set the default value.
|
void |
setFlag(long flag,
boolean state)
Set the specified flag on or off.
|
void |
setFlag(long flag,
boolean state,
MXException mxe)
Set the specified flag on or off.
|
void |
setFlags(long flags)
Set the fields flags to the specified values.
|
void |
setFlags(long flags,
MXException mxe)
Set the fields flags to the specified values.
|
void |
setGuaranteedUnique(boolean flag)
Set the guaranteedUnique flag.
|
void |
setHidden(boolean val)
Set or clear the hidden flag.
|
void |
setReadOnly(boolean ro)
Set this field read only.
|
void |
setRequired(boolean state)
Set this field required.
|
void |
setToBeValidated(boolean value) |
void |
setValue(boolean value)
Set the value of the field using the specified access modifiers
|
void |
setValue(boolean val,
long accessModifier)
Set the value of the field.
|
void |
setValue(byte value)
Set the value of the field using the specified access modifiers
|
void |
setValue(byte[] value)
Set the value of the field using the specified access modifiers
|
void |
setValue(byte[] val,
long accessModifier)
Set the value of the field.
|
void |
setValue(byte val,
long accessModifier)
Set the value of the field.
|
void |
setValue(java.util.Date value)
Set the value of the field using the specified access modifiers
|
void |
setValue(java.util.Date val,
long accessModifier)
Set the value of the field.
|
void |
setValue(double value)
Set the value of the field using the specified access modifiers
|
void |
setValue(double val,
long accessModifier)
Set the value of the field.
|
void |
setValue(float value)
Set the value of the field using the specified access modifiers
|
void |
setValue(float val,
long accessModifier)
Set the value of the field.
|
void |
setValue(int value)
Set the value of the field using the specified access modifiers
|
void |
setValue(int val,
long accessModifier)
Set the value of the field.
|
void |
setValue(long value)
Set the value of the field using the specified access modifiers
|
void |
setValue(long val,
long accessModifier)
Set the value of the field.
|
void |
setValue(java.lang.String value)
Set the value of the field using the specified access modifiers
|
void |
setValue(java.lang.String val,
long accessModifier)
Set the value of the field.
|
void |
setValueFromLookup(MboRemote sourceMbo)
This method sets the value of the correspoinding field of the lookup Mbo and it
also set other fields corresponding to the other keys of the lookup Mbo
if it is multi-keyed.
|
void |
setValueNull() |
void |
setValueNull(long accessModifier)
Set the value null, use the specified access modifiers to determine
if this can be done
|
MboSetRemote |
smartFill(java.lang.String value,
boolean exact)
Returns a MBO set of the lookup MBO based on the criteria set on the
field.
|
MboSetRemote |
smartFind(java.lang.String value,
boolean exact)
Returns a MBO set based on the value set to this field.
|
MboSetRemote |
smartFind(java.lang.String object,
java.lang.String value,
boolean exact)
Returns a MBO set of the type specified based on the value set to this field.
|
void |
takeCheckpoint()
takes a checkpoint i.e.
|
java.lang.String |
toString() |
void |
validate()
Called by the framework to validate the field.
|
void |
validate(long access) |
public void construct(Mbo mbo, MboValueInfo mvInfo) throws MXException
MXExceptionpublic void init()
throws MXException
MXExceptionpublic void initValue()
throws MXException
MXExceptionpublic MboValueData getMboValueData()
public MboValueData getMboValueData(boolean ignoreFieldFlags)
public Mbo getMbo()
public java.lang.String getDefault()
public boolean hasLongDescription()
public void setDefault(java.lang.String val)
public void setValueNull(long accessModifier)
throws MXException
MXExceptionpublic void setValueNull()
throws MXException
MXExceptionpublic void _setValueNull()
throws MXException
MXExceptionpublic boolean isNull()
throws MXException
MXExceptionpublic MaxType getCurrentValue() throws MXException
MXExceptionpublic MaxType getInitialValue() throws MXException
MXExceptionpublic MaxType getPreviousValue() throws MXException
MXExceptionpublic final java.lang.String getString()
throws MXException
MXExceptionpublic final boolean getBoolean()
throws MXException
MXExceptionpublic final byte getByte()
throws MXException
MXExceptionpublic final int getInt()
throws MXException
MXExceptionpublic final long getLong()
throws MXException
MXExceptionpublic final float getFloat()
throws MXException
MXExceptionpublic final double getDouble()
throws MXException
MXExceptionpublic final java.util.Date getDate()
throws MXException
MXExceptionpublic final byte[] getBytes()
throws MXException
MXExceptionpublic final MaxType getMaxType() throws MXException
MXExceptionpublic final void setValue(int value)
throws MXException
MXExceptionpublic final void setValue(int val,
long accessModifier)
throws MXException
MXExceptionpublic final void setValue(java.lang.String value)
throws MXException
MXExceptionpublic final void setValue(java.lang.String val,
long accessModifier)
throws MXException
MXExceptionpublic final void setValue(boolean value)
throws MXException
MXExceptionpublic final void setValue(boolean val,
long accessModifier)
throws MXException
MXExceptionpublic final void setValue(byte value)
throws MXException
MXExceptionpublic final void setValue(byte val,
long accessModifier)
throws MXException
MXExceptionpublic final void setValue(long value)
throws MXException
MXExceptionpublic final void setValue(long val,
long accessModifier)
throws MXException
MXExceptionpublic final void setValue(float value)
throws MXException
MXExceptionpublic final void setValue(float val,
long accessModifier)
throws MXException
MXExceptionpublic final void setValue(double value)
throws MXException
MXExceptionpublic final void setValue(double val,
long accessModifier)
throws MXException
MXExceptionpublic final void setValue(byte[] value)
throws MXException
MXExceptionpublic final void setValue(byte[] val,
long accessModifier)
throws MXException
MXExceptionpublic final void setValue(java.util.Date value)
throws MXException
MXExceptionpublic final void setValue(java.util.Date val,
long accessModifier)
throws MXException
MXExceptionpublic void setCurrentFieldAccess(long access)
public void resetCurrentFieldAccess()
public long getCurrentFieldAccess()
public final void validate(long access)
throws MXException
MXExceptionpublic final void validate()
throws MXException
MXExceptionpublic boolean isModified()
public boolean isReadOnly()
public void setReadOnly(boolean ro)
public boolean isHidden()
public void setHidden(boolean val)
public java.lang.String getName()
public java.lang.String getAttributeName()
public MboValueInfo getMboValueInfo()
public int getLength()
public int getScale()
public java.lang.String getColumnTitle()
public abstract int getType()
public boolean hasList()
public MboSetRemote getList() throws MXException, java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic MboSetRemote smartFill(java.lang.String value, boolean exact) throws MXException, java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic MboSetRemote smartFind(java.lang.String value, boolean exact) throws MXException, java.rmi.RemoteException
value - exact - MXExceptionjava.rmi.RemoteExceptionpublic MboSetRemote smartFind(java.lang.String object, java.lang.String value, boolean exact) throws MXException, java.rmi.RemoteException
value - exact - MXExceptionjava.rmi.RemoteExceptionpublic java.lang.String getMatchingAttr()
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic java.lang.String getMatchingAttr(java.lang.String sourceObjectName)
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic boolean isRequired()
public void setRequired(boolean state)
public boolean isPersistent()
public boolean isExtended()
public boolean isGuaranteedUnique()
public void setGuaranteedUnique(boolean flag)
flag - public void autoKey()
throws MXException
WARNING: Currently there is only one autokey value per database table, so the programmer should make sure that an autokey is only used once in each object.
MXExceptionAutoKey,
Mbo.generateAutoKey()public void autoKeyByMboSiteOrg()
throws MXException
MXExceptionpublic void addMboValueListener(MboValueListener l)
public java.util.Vector<MboValueListener> getListeners()
public void removeMboValueListener(MboValueListener l)
public void checkFieldAccess(long accessModifier)
throws MXException
MXExceptionpublic boolean hasFieldAccess(long accessModifier)
throws MXException
MXExceptionpublic void setFlags(long flags)
public void setFlags(long flags,
MXException mxe)
public long getFlags()
public void setFlag(long flag,
boolean state)
public void setFlag(long flag,
boolean state,
MXException mxe)
public boolean isFlagSet(long flag)
public void getFieldFlagFromMbo(long flag)
public MXException getMXException()
public void generateUniqueID()
throws MXException
MXExceptionpublic boolean isToBeValidated()
public void setToBeValidated(boolean value)
public ServiceRemote getIntegrationService() throws java.rmi.RemoteException, MXException
java.rmi.RemoteExceptionMXExceptionpublic void rollbackToCheckpoint()
public void takeCheckpoint()
public void setValueFromLookup(MboRemote sourceMbo) throws MXException, java.rmi.RemoteException
sourceMbo - The Mbo whose key values will be crossed over to the current
MboMXExceptionjava.rmi.RemoteExceptionpublic java.lang.String[] getAppLink()
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic java.lang.String getLookupName()
throws MXException,
java.rmi.RemoteException
MXExceptionjava.rmi.RemoteExceptionpublic void setBypassOperatorCheck(boolean val)
val - When set to True, the validation class FldMboKey will not check
the EXPRLIST when validating this MboValue.FldMboKey.operatorExistCheck(java.lang.String)public void setApplicationError(ApplicationError appError)
appError - The ApplicationError to be set on the MboValuepublic ApplicationError getApplicationError()
public void setCurProcessValue(java.lang.String value)
public java.lang.String getCurProcessValue()
public void setApplicationRequired(boolean appRequired)
appReqired - public boolean isApplicationRequired()
public java.lang.String toString()
toString in class java.lang.Object