psdi.mbo

Class Mbo

  • java.lang.Object
    • psdi.mbo.Mbo
    • Constructor Summary

      Constructors 
      Constructor and Description
      Mbo(MboSet ms)
      Construct the Mbo.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      void add()
      This is called when a new Mbo is added to the Mboset collection.
      void addMboSetForRequiredCheck(MboSetRemote mboSet)
      Adds the related MboSet to a list that will be used to check for required fields without a value when the top most mboset is saved.
      void addToDeleteForInsertList(java.lang.String mboName)
      Add name of child mbo to the DeleteForInsert list.
      boolean andEvaluateConditions(DataRestrictionCache.RestrictionBundle restrictions)
      Evaluate a bundle of restrictions.
      void appValidate()
      Pre-save validation method.
      MboRemote blindCopy(MboSetRemote mboset)
      Adds a new mbo to the set passed in and copies all the information for each of the fields into the new mbo.
      void canDelete()
      Can the object be deleted ? This is object specific and should be overridden.
      void checkFieldAccess(long accessModifier)
      Check field access for the entire object.
      void checkMethodAccess(java.lang.String methodName)
      Check if the method name is available.
      void checkMethodAccess(java.lang.String methodName, long accessModifier)
      Check if the method name is available.
      void checkQualifiedRestriction()
      Check whether the to be saved record is qualified by the QUALIFIED data restriction if any.
      protected void checkRecordLock()
      Checks the MAXRECORDLOCKCACHE if this Mbo is locked by another session.
      void checkSiteOrgAccessForSave()
      Checks for access to siteid or orgid, and for conditional sigoption for optionnames INSERT, DELETE, and/or SAVE.
      void clear()
      Clears out any references to other MBOs
      protected void clearRelatedSets()
      Close and clear related (child) MboSets, and remove from hashtable.
      protected void clearRelatedSets(java.util.HashSet namesToClear)
      Close and clear the named related (child) MboSets, and remove from hashtable.
      protected void commit() 
      MboRemote copy()
      Adds a new mbo to this set and copies the values from the current record into the new one.
      MboRemote copy(MboSetRemote mboset)
      Adds a new mbo to the set passed in and copies the information for each of the fields into the new mbo from this.
      MboRemote copy(MboSetRemote mboset, long mboAddFlags)
      Adds a new mbo to the set passed in and copies the information for each of the fields into the new mbo from this.
      MboRemote copyFake(MboSetRemote mboset)
      Adds a fake mbo to the set passed in and copies theinformation for each of the fields into the new mbo from this.
      void copyValue(MboRemote sourceMbo, java.lang.String[] attrSource, java.lang.String[] attrTarget, long flags)
      This method will copy the given values of multiple source attributes to
      multiple target attributes.
      1.
      void copyValue(MboRemote sourceMbo, java.lang.String attrSource, java.lang.String attrTarget, long flags)
      This method will copy value of source attribute to target attribute
      1.
      MboRemote createComm()
      Create a communication log associated with the current Mbo.
      void delete()
      Mark the object to be deleted with all the normal security checks.
      void delete(long accessModifier)
      Mark the object to be deleted depending on the access modifier.
      protected void deleteDoclinks() 
      java.util.List determineRequiredFieldsFromERM(java.util.Collection attributes, int mboVectorIndex)
      Using the passed in list of ERMAttributes, this method will obtain a complete list of required fields that need a value for this mbo.
      MboRemote duplicate()
      Duplicate method only throws exception now
      void enableMethod(java.lang.String methodName, boolean state)
      Enable/disable a certain method name
      boolean evaluateCondition(java.lang.String conditionNum)
      Evaluate to true or false the given single condition by the condition number.
      boolean evaluateCondition(java.lang.String conditionNum, boolean logErrorOnly)
      Evaluate to true or false the given single condition by the condition number.
      java.util.HashMap evaluateCtrlConditions(java.util.HashSet options) 
      java.util.HashMap evaluateCtrlConditions(java.util.HashSet options, java.lang.String app)
      Evaluate conditions for a given set of option names.
      boolean evaluateRestriction(DataRestriction restriction)
      Evaluate the restriction by its ID.
      boolean excludeObjectForPropagate(java.lang.String name)
      Check if the object is exclude from propagation
      java.util.List findAllNullRequiredFields(java.util.Collection attributes, int mboIndex)
      Returns a list of ERMAttributeError for each required attribute with a null value.
      void fireEvent(java.lang.String type)
      fires events for the different types of events for all business objects The possible different types are - validate, preSaveEventAction, eventAction, postCommitEventAction
      void generateAutoKey()
      This method has the mbo generate a unique identifier for itself.
      void generateContentUID()
      Provide the contentuid.
      BitFlag getAlwaysFlags(java.lang.String attr)
      Returns the access flag that apply to the attribute of all the records in the set unconditionally.
      BitFlag getAttrRestrictionFlag(java.lang.String attr)
      Get the bit flag set by the attribute restriction.
      DataRestrictionCache.RestrictionBundle getAttrRestrictions(int levelRequested, java.lang.String attr)
      Returns an array list of the attribute restrictions of the requested restriction level that applies to the attribute.
      boolean getBoolean(java.lang.String attributeName)
      Retrieves the boolean value of the attribute identified by name within the current object.
      byte getByte(java.lang.String attributeName)
      Retrieves an attribute value identified by name within the current object
      byte[] getBytes(java.lang.String attributeName)
      Retrieves an attribute value identified by name within the current object
      boolean getCheckpoint() 
      java.util.Locale getClientLocale()
      Helper to get the locale of the client previously set for collection
      java.util.TimeZone getClientTimeZone()
      Helper to get the time zone of the client previously set for collection
      java.lang.Object[] getCommLogOwnerNameAndUniqueId()
      Retuns an object array of owner object name and uniqueid so that commlog can set in the commlog table.
      MaxCondition getCondition(java.lang.String conditionNum)
      Get the MaxCondition object by the condition id.
      java.lang.Object getDatabaseValue(java.lang.String attributeName)
      Returns the value of the column at the time of databse fetch.
      java.util.Date getDate(java.lang.String attributeName)
      Retrieves the date value of the attribute identified by name within the current object.
      java.util.Vector getDeleteForInsertList()
      Returns the list of deleteForInsert mbo names.
      int getDocLinksCount()
      This method recursively traverse the doclinks tree of an object, and count the total number of attached documents related to it.
      java.lang.String getDomainFilterWhere(java.lang.String filterKeyword)
      Get the domain filter where based on the filter keyword which contains the attribute name.
      java.lang.String[] getDomainIDs(java.lang.String attr)
      Returns an array of all domain ids linked to the field.
      double getDouble(java.lang.String attributeName)
      Retrieves the double value of the attribute identified by name within the current object.
      java.lang.String getESId() 
      MboSetRemote getExistingMboSet(java.lang.String relationship)
      Get a related MboSet for the object using the named relationship only if the the MboSet already exists.
      int getFetchIndex()
      Returns the fetch index.
      java.util.Hashtable getFieldExceptions()
      Return the hashtable of field Exceptions
      long getFlags()
      Deprecated. 
      Replaced by isFlagSet(flag)
      float getFloat(java.lang.String attributeName)
      Retrieves the float value of the attribute identified by name within the current object.
      boolean getIgnoreLockCheck() 
      MaxType getInitialValue(java.lang.String attributeName) 
      java.lang.String getInsertCompanySetId()
      Returns the default company set id to be applied to a new mbo.
      java.lang.String getInsertItemSetId()
      Returns the default item set id to be applied to a new mbo.
      java.lang.String getInsertOrganization()
      Returns the default orgid to be applied to a new mbo.
      java.lang.String getInsertOrgForSite(java.lang.String site)
      Returns the default site to be applied to a new mbo.
      java.lang.String getInsertSite()
      Returns the default site to be applied to a new mbo.
      MboSetRemote getInstanciatedMboSet(java.lang.String relationshipName)
      Returned a MboSet with the specified relationship name.
      MboValue getInstanciatedMboValue(java.lang.String name)
      Return a MboValue object given the name, but only if it has been instanciated Returns null if no MboValue has been create with that name.
      int getInt(java.lang.String attributeName)
      Retrieves the integer value of the attribute identified by name within the current object.
      ServiceRemote getIntegrationService()
      Convenience Method for getting the IntegrationServiceRemote.
      KeyValue getKeyValue()
      Get the key value of this object
      long[] getLanguageRecordRowStamp()
      Get the array of language rowstamp values.
      java.lang.String getLinesRelationship() 
      MboSetRemote getList(java.lang.String attribute)
      Get the list of valid values for the attribute.
      java.lang.String getLockedByDisplayName()
      Returns the display name of the user who has this Mbo locked
      java.lang.String getLockedByUserID()
      Returns the userid of the user who has this Mbo locked
      long getLong(java.lang.String attributeName)
      Retrieves the long value of the attribute identified by name within the current object.
      java.lang.String getMatchingAttr(java.lang.String attribute)
      Get the attribute in the lookup table which matches the specified attribute of this MBO.
      java.lang.String getMatchingAttr(java.lang.String sourceObjectName, java.lang.String attribute)
      Get the attribute in the lookup table which matches the specified attribute of this MBO.
      java.lang.Object[] getMatchingAttrs(java.lang.String sourceName, java.lang.String targetAttr)
      This method retieves the lookup attribute mapping from the lookup source table to the target table by looking at the MAXLOOKUPMAP table if the mapping is specified there.
      MaxMessage getMaxMessage(java.lang.String errGrp, java.lang.String errKey)
      Get the MaxMessage object for the specified error group and errorkey.
      java.lang.Object getMboCtx(java.lang.String propName) 
      MboData getMboData(java.lang.String[] attributes)
      Return a MboData object for the specified list of attributes.
      java.util.Vector getMboDataSet(java.lang.String relationship)
      Returns a set of Mbos using the dot notation relationships.
      MboRemote getMboForAttribute(java.lang.String attributeName)
      Take a attribute name (which may have a .
      MboRemote getMboForAttributeStatic(java.lang.String attributeName)
      Take a attribute name (which may have a .
      MaxType getMboInitialValue(java.lang.String name)
      Returns the MaxType (initial value) object given the column name.
      java.util.List getMboList(java.lang.String mrp) 
      MXLogger getMboLogger()
      Returns a logger to log messages related to this business object.
      psdi.mbo.MboRecordData getMboRecordData()
      Returns the mbo record data as obtained from the database
      MboServerInterface getMboServer()
      Helper function to return the MboServer of the owning collection
      MboSetRemote getMboSet(java.lang.String name)
      Get a related MboSet for the object using the named relationship.
      MboSetRemote getMboSet(java.lang.String name, java.lang.String objectName)
      Create or retrieve an MboSet.
      MboSetRemote getMboSet(java.lang.String name, java.lang.String objectName, java.lang.String relationship)
      Retrieve the named(1st parameter) Mboset if it has been instanciated or create a new MboSet using the name(1st parameter) if it has not been instanciated.
      protected MboSetInfo getMboSetInfo()
      Return information about the object
      MboSetInfo getMboSetInfo(java.lang.String mboName)
      Return information about the passed object
      MboValue getMboValue(java.lang.String nameInput)
      Return a MboValue object given the name.
      MboValueData getMboValueData(java.lang.String attribute)
      Returns the MboValueData for the specified attribute.
      MboValueData[] getMboValueData(java.lang.String[] attribute)
      Returns an array of MboValue objects for the specified attributes.
      MboValueData getMboValueData(java.lang.String attribute, boolean ignoreFieldFlags)
      Overloaded method of getMboValueData() to take a flag indicating if the logic of attribute readonlyness can be ignored.
      MboValueData[] getMboValueDataForDownload(java.lang.String[] attribute) 
      MboValueInfoStatic getMboValueInfoStatic(java.lang.String attribute)
      Get MboValueInfoStatic object of the attribute.
      MboValueInfoStatic[] getMboValueInfoStatic(java.lang.String[] attribute)
      Get a list of MboValueInfoStatic for an array of attributes.
      java.lang.String getMessage(MXException ex)
      Get the message of the exception in the language specified by this Mbo's userInfo.
      java.lang.String getMessage(java.lang.String errGrp, java.lang.String errKey)
      Get the message in the language specified by this MboSet's userInfo for the error group and error key.
      java.lang.String getMessage(java.lang.String errGrp, java.lang.String errKey, java.lang.Object param)
      Get the message for the error group, error key and the parameter in the language of this Mbo's userInfo.
      java.lang.String getMessage(java.lang.String errGrp, java.lang.String errKey, java.lang.Object[] params)
      Get the message for the error group, error key and the parameter in the language of this Mbo's userInfo.
      MXTransaction getMXTransaction()
      Return the MXTransaction that this Mbo participates in.
      java.lang.String getName()
      Return the name
      java.lang.String getOrgForGL(java.lang.String lookupAttr)
      returns OrgId to be used for GL
      java.lang.String getOrgSiteForMaxvar(java.lang.String maxvarName)
      Returns org or site for getting maxvar
      MboRemote getOwner()
      Return the owner of mbo
      ProfileRemote getProfile()
      Return the profile object for this UserInfo.
      boolean getPropagateKeyFlag()
      method for getting the propagate key flag
      java.rmi.Remote getProxy() 
      java.lang.String getRecordIdentifer()
      Generate a string text composed of object name, key names and values to identify the MBO object.
      java.lang.String getRecordMboName()
      Returns the name of the Mbo if this record was in memory as the type is actually is.
      protected java.lang.String getRecordType() 
      protected java.util.Hashtable getRelatedSets()
      Returns the list of related MboSets in a hashtable.
      java.lang.String getRelatedWhere()
      Get the where clause for all the related objects that have had a Qbe set on them.
      java.lang.String getRelatedWhere(java.lang.String alias)
      Get the where clause for all the related objects that have had a Qbe set on them.
      java.lang.String getRelationshipNameToLangTable(java.lang.String attributeName) 
      java.lang.String getResourceName() 
      BitFlag getRowRestrictionFlag()
      Get the bit flag set by the attribute restriction.
      java.lang.String getRowStamp()
      Returns the string representation of the rowstamp.
      java.lang.Object getRowStampObject() 
      MXLogger getSecurityLogger()
      Returns a logger to log security messages related to this business object.
      java.lang.String[] getSiteOrg()
      Find the org and site ids of current record.
      MXLogger getSqlLogger()
      Returns a logger to log SQL messages related to this business object.
      java.lang.String getString(java.lang.String attributeName)
      Retrieves the string value of the attribute identified by name within the current object.
      java.lang.String getString(java.lang.String attributeName, java.lang.String langCode)
      Get the string of the attribute in the specified language.
      java.lang.String getStringInBaseLanguage(java.lang.String attributeName)
      Get the base language of a certain attribute
      java.lang.String getStringInSpecificLocale(java.lang.String attribute, java.util.Locale l, java.util.TimeZone tz)
      Get the string of the value in a specific locale and timezone.
      java.lang.String getStringTransparent(java.lang.String attributeName, java.lang.String langCode)
      Returns the string in the specified language code if exists.
      static java.lang.String getSynonymValueWhere(java.lang.String filterKeyword)
      Get a list of synonym values that can be used in the sql by the keyword.
      int getTenantId(java.lang.String tableName) 
      int getTenantIdForNoMboRecordData() 
      MboSetRemote getThisMboSet()
      Return the set that owns this Mbo
      Translate getTranslator()
      Return the translator object which can be used to convert locale sensitive strings
      java.lang.String getUniqueIdentifer()
      Returns the UniqueIdName and UniqueIdVlaue concaenated as a string and delimited by a space.
      java.lang.String getUniqueIDName()
      returns the unique ID name
      long getUniqueIDValue()
      Gets the unique ID value
      long[] getUniqueLanguageIDRecord()
      Get the array of the unique language table ID values.
      UserInfo getUserInfo()
      Return the user info for the mbo
      java.lang.String getUserName()
      Return user name logged into server
      java.lang.String[] getValidateOrder()
      Returns a String[] of field names.
      boolean hasFieldAccess(long accessModifier)
      Check field access for the entire object.
      boolean hasHierarchyLink()
      method for getting if mbo has any hierarchy link or not
      boolean hasLockSaveRights(java.lang.String app) 
      boolean hasRelatedQbe()
      Do t he related MboSets have a Qbe ?
      boolean hasUniqueID()
      If this MBO has a UniqueID column or not.
      void init()
      Called by the framework when the Mbo has been constructed and the MboValues have been initialized.
      void initFieldFlagsOnMbo(java.lang.String attrName)
      The logic of setting the readonly and required field flags to the mbo.
      void initRelationship(java.lang.String relationName, MboSetRemote mboSet)
      Called whenever a relationship is initialized or reset from this Mbo to another MboSet.
      boolean isApiBatchError() 
      protected boolean isAppLockEnabled(java.lang.String app) 
      boolean isAutoKeyed(java.lang.String attributeName)
      Returns whether the given attribute name is autokeyed or not whenever a new mbo is created.
      boolean isBasedOn(java.lang.String objectName)
      Returns true, if this business object is based on the given business object name.
      boolean isChangeByUserWhenSetFromLookup(java.lang.String lookupAttrName, java.lang.String attributeName)
      Indicate whether the changeed by user flag should be set to the attribute when it is set along with other key field when the lookup attribute is being set on this Mbo.
      protected boolean isDuringInit()
      Check whether the mbo is being initialized and added so the data restriction will not take effect.
      boolean isEAuditFieldModified()
      Indicates whether any of the fields enabled for electronic audit are modified by the user.
      boolean isESigFieldModified()
      Indicates whether any of the fields enabled for electronic signature are modified by the user.
      boolean isFlagSet(long flag)
      Return the state of the specified mbo flag
      boolean isForDM() 
      boolean isLocked() 
      boolean isLocked(boolean cache) 
      boolean isLockedByMe() 
      boolean isMasterTenant(java.lang.String tableName) 
      boolean isMboLockedByMe()
      Checks if the current MBO is locked by this Session.
      boolean isModified()
      Has the data in the object been changed? An object is modified if one or more of its attributes have been changed.
      boolean isModified(java.lang.String attribute)
      Has the data in the attribute changed? An attribute is modified if data is changed through one of the setValue methods.
      boolean isNew()
      Returns whether the mbo is new or not.
      boolean isNoSql() 
      boolean isNull(java.lang.String attributeName)
      Determines whether the attribute value identified by name within the current object is null.
      boolean isOptionGranted(java.lang.String app, java.lang.String option)
      Is the given option granted for the app
      boolean isSelected()
      Returns whether the mbo is marked for selection.
      boolean isSkipCopyField(MboValueInfo mvi) 
      boolean isValid()
      Is this a valid object ?
      boolean isZombie()
      Returns whether the Mbo is a Zombie mbo or not.
      void lock(boolean lockNow) 
      void modify()
      This called whenever a change is made to the attributes of a MBO.
      void moveFieldFlagsToMboValue(MboValue mv)
      Internal method to move the flags set for the field on the Mbo to the mbovalue.
      boolean needCallInitFieldFlag(java.lang.String attrName)
      This method will be called everytime when a field flag is requested for this attribute after the initial calling to method initFieldFalg(String) on the MBO.
      boolean orEvaluateConditions(DataRestrictionCache.RestrictionBundle restrictions)
      Evaluate the restrictions according to a OR logic.
      void propagateKeyValue(java.lang.String keyName, java.lang.String keyValue)
      Method for propagating key value.
      java.lang.Object removeCtx(java.lang.String propName) 
      boolean removeRelatedSet(MboSetRemote relatedSet) 
      boolean resolveNoSqlWhere() 
      void rollbackToCheckpoint()
      Reverts to the saved value.
      protected void save()
      Save the object and other linked objects.
      void select()
      Marks the mbo selected.
      void setAppDefaultValue()
      method for setting the default app value for a mbo(appfielddefault table)
      void setApplicationError(java.lang.String attribute, ApplicationError appError)
      This method will set the passed in ApplicationError on the MboValue associated this the passed in attribute.
      void setApplicationRequired(java.lang.String attribute, boolean required)
      This method will set the application required boolen flag on the MboValue associated this the passed in attribute.
      void setAutokeyFields()
      Methods to set the autokey to the autokey fields.
      void setCopyDefaults()
      Programmer should override this method a initialize any fields that are not copied correctly by the copy() method.
      protected void setDatabaseDefaultValues()
      Called by the framework to set field defaults that have been set by the user in the data dictionary.
      protected void setDatabaseDefaultValues(boolean setAutoKey)
      Called by the framework to set field defaults that have been set by the user in the data dictionary.
      void setDefaultValue()
      method for setting the default value for a mbo(screen default)
      void setDefaultValues()
      method for setting the jsp field default values for a mbo
      void setDeleted(boolean deleted)
      Marks the Mbo as Deleted.
      protected void setDuringInit(boolean value)
      Set the object's duringint flag.
      void setEAuditFieldModified(boolean eAuditFieldModified)
      Sets whether any of the fields enabled for electronic audit are modified by the user.
      void setESId(java.lang.String esId) 
      void setESigFieldModified(boolean eSigFieldModified)
      Sets whether any of the fields enabled for electronic signature are modified by the user.
      void setFetchIndex(int index)
      Sets the fetch index.
      void setFieldFlag(java.lang.String[] names, boolean inclusive, long flag, boolean state)
      For the specified fields, set the flag to a state if inclusive Else set all other fields in this Mbo to a state if exclusive This does not instanciate a MboValue so should be used whenever possible.
      void setFieldFlag(java.lang.String[] names, boolean inclusive, long flag, boolean state, MXException mxe)
      For the specified fields, set the flag to a state if inclusive Else set all other fields in this Mbo to a state if exclusive This does not instanciate a MboValue so should be used whenever possible.
      void setFieldFlag(java.lang.String[] names, long flag, boolean state)
      For the specified fields, set the flag to a state.
      void setFieldFlag(java.lang.String[] names, long flag, boolean state, MXException mxe)
      For the specified fields, set the flag to a state.
      void setFieldFlag(java.lang.String name, long flag, boolean state)
      For the specified field, set the flag to a state.
      void setFieldFlag(java.lang.String name, long flag, boolean state, MXException mxe)
      For the specified field, set the flag to a state.
      void setFieldFlags(java.lang.String name, long flags)
      Deprecated. 
      Replaced by setFieldFlag(name, flag, state)
      void setFlag(long flag, boolean state)
      Set the Mbo flags to the specified values.
      void setFlag(long flag, boolean state, MXException mxe)
      Set the Mbo flags to the specified values.
      void setFlags(long flags)
      Deprecated. 
      Replaced by setFlag(flag, state)
      void setForDM(boolean forDM) 
      void setHierarchyLink(boolean flag)
      method for setting the Hierarchy link
      void setIgnoreRecordLockCheck(boolean ignoreRecordLock)
      Set to ignore record lock check
      void setLangCodeDefault() 
      void setMboCtx(java.lang.String propName, java.lang.Object o) 
      void setMLValue(java.lang.String attributeName, java.lang.String langCode, java.lang.String value, long accessModifier)
      Set the values by the specific lang code.
      void setModified(boolean modified)
      Marks the Mbo as Modified.
      void setModifiedForIntegrationOnly(boolean modified)
      Marks the Mbo as modified for integration purposes.
      void setNewMbo(boolean flag)
      Turns on a flag to indicate that this is a new Mbo.
      void setNoSql(boolean noSql) 
      void setPropagateKeyFlag(boolean flag)
      method for setting the propagate key flag
      void setPropagateKeyFlag(java.lang.String[] objectName, boolean flag)
      methos to set objectnames to exclude from propagation
      void setProxy(java.rmi.Remote proxy) 
      void setReadonlyWhenParentIsReadonly(java.lang.String relationshipName, MboSetRemote mboSet, boolean flag)
      This method should be called in initRelationship() if the passed mbo set is not going to set to readonly if the parent Mbo is readonly.
      protected void setRecordType() 
      void setReferencedMbo(java.lang.String token, Mbo refMbo) 
      void setReferencedMbo(java.lang.String token, MboRemote refMbo)
      We need this methods to keep track of the Process like WorkflowInstance
      void setResolveNoSqlWhere(boolean resolveNoSqlWhere) 
      void setResourceName(java.lang.String resourceName) 
      void setTenantIdForNoMboRecordData(int tenantId) 
      void setUniqueIDValue()
      Sets the unique column Value
      void setValue(java.lang.String attributeName, boolean val)
      Sets a boolean value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, boolean val, long accessModifier)
      Sets a boolean value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, byte val)
      Sets a byte value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, byte[] val)
      Sets an array of byte values to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, byte[] val, long accessModifier)
      Sets an array of byte values to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, byte val, long accessModifier)
      Sets a byte value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, java.util.Date val)
      Sets a date value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, java.util.Date val, long accessModifier)
      Sets a java.util.Date value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, double val)
      Sets a double value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, double val, long accessModifier)
      Sets a double value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, float val)
      Sets a float value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, float val, long accessModifier)
      Sets a float value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, int val)
      Sets an integer value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, int val, long accessModifier)
      Sets an integer value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, long val)
      Sets a long value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, long val, long accessModifier)
      Sets a long value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, MaxType mboValue, long accessModifier)
      Set the value based on the MaxType object passed in.
      void setValue(java.lang.String targetAttrName, MboRemote sourceMbo)
      This method set the related fields of the current record to the values of the corresponding key field of the sourceMbo.
      void setValue(java.lang.String targetAttrName, MboSetRemote sourceMboSet)
      This method set the related fields of the current record to the values of the corresponding key field of the current Mbo of sourceMboSet.
      void setValue(java.lang.String attributeName, short val)
      Sets a short value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, short val, long accessModifier)
      Sets a short value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValue(java.lang.String attributeName, java.lang.String val)
      Sets a string value to an attribute identified by name within the current object.
      void setValue(java.lang.String attributeName, java.lang.String val, long accessModifier)
      Sets a string value to an attribute identified by name within the current object and access to the value is controlled by the access modifier.
      void setValueFromSequence(java.lang.String attributeName)
      Sets the attribute value from maxsequence or native sequence (depending on platform).
      void setValueNull(java.lang.String attributeName)
      Sets an attribute value identified by name null with no access modifiers.
      void setValueNull(java.lang.String attributeName, long accessModifier)
      Sets an attribute value identified by name within the current object to null using the specified access modifiers.
      java.util.HashMap sigopGranted(java.util.Set optionnames)
      Identify whether sigoptions have been granted, based on this app, this Mbo's siteid/orgid, and any conditions that may have been attached to the applicationauth record.
      boolean sigopGranted(java.lang.String optionname)
      Identify whether this sigoption has been granted, based on this app, this Mbo's siteid/orgid, and any conditions that may have been attached to the applicationauth record.
      boolean sigopGranted(java.lang.String app, java.lang.String optionname)
      Identify whether this sigoption has been granted, based on this app, this Mbo's siteid/orgid, and any conditions that may have been attached to the applicationauth record.
      protected boolean sigopGranted(java.lang.String app, java.lang.String optionname, java.lang.String mboSite, java.lang.String mboOrg) 
      void sigOptionAccessAuthorized(java.lang.String optionname)
      Calls sigopGranted to check for security permission for the specified optionname.
      protected boolean skipCopyField(MboValueInfo mvi) 
      MboSetRemote smartFill(java.lang.String attribute, java.lang.String value, boolean exact)
      Similar to getList().
      MboSetRemote smartFind(java.lang.String attribute, java.lang.String value, boolean exact)
      Similar to getList().
      MboSetRemote smartFind(java.lang.String attribute, java.lang.String value, boolean exact, boolean isRecordHover)
      Similar to getList().
      MboSetRemote smartFind(java.lang.String appName, java.lang.String attribute, java.lang.String value, boolean exact)
      Find a set of records of the object of the specified the application by the specifyed attribute and value of the current record.
      MboSetRemote smartFindByObjectName(java.lang.String sourceObj, java.lang.String targetAttrName, java.lang.String value, boolean exact)
      Find a set of records of the object of the specified the application by the specifyed attribute and values of the current record.
      MboSetRemote smartFindByObjectName(java.lang.String sourceObj, java.lang.String targetAttrName, java.lang.String value, boolean exact, java.lang.String[][] cachedKeyMap)
      Find a set of records of the object of the specified the application by the specifyed attribute and values of the current record.
      MboSetRemote smartFindByObjectNameDirect(java.lang.String sourceObj, java.lang.String targetAttrName, java.lang.String value, boolean exact)
      Find a set of records of the object of the specified the application by the specifyed attribute and values of the current record.
      void startCheckpoint()
      Save the current value for later rollback.
      boolean thisToBeUpdated()
      Is the Mbo to be updated in storage ?
      protected void throwRequiredException(MXException mxe, MboValueInfo mvi, MboValue mv)
      Called from validate when a required field has null value.
      boolean toBeAdded()
      Is the Mbo to added to storage ?
      boolean toBeDeleted()
      Is the Mbo to be deleted from storage ?
      boolean toBeSaved()
      Does the object need to be saved to persistent storage ? This will also check linked objects.
      boolean toBeUpdated()
      Is the Mbo to be updated in storage ?
      boolean toBeValidated()
      Does the object need validating ? This will also check linked objects.
      void undelete()
      Unmark the Mbo for deletion.
      protected void undeleteDoclinks() 
      void unlock(boolean unlockNow)
      Unlocks the current MBO if recordlocking is enabled by the system property
      void unselect()
      Marks the mbo unselected
      boolean useDataSecurity(java.lang.String group) 
      void validate()
      Validate the object.
      java.util.Hashtable validateAttributes()
      Go through the attributes of this Mbo in the order specified by getValidateOrder().
      void validateKeyUniqueness()
      Check whether the combination of primary keys are unique.
      void valueChanged()
      A field value has changed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MULTILANGCOPY

        public static final java.lang.String MULTILANGCOPY
        Bulletin Board signal to copy all language versions
        See Also:
        Constant Field Values
      • phantomList

        public static java.util.Set phantomList
      • phantomQueue

        public static java.lang.ref.ReferenceQueue phantomQueue
    • Constructor Detail

      • Mbo

        public Mbo(MboSet ms)
            throws java.rmi.RemoteException
        Construct the Mbo.
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • isDuringInit

        protected boolean isDuringInit()
        Check whether the mbo is being initialized and added so the data restriction will not take effect.
        Returns:
      • setDuringInit

        protected void setDuringInit(boolean value)
        Set the object's duringint flag.
        Parameters:
        value -
      • setProxy

        public void setProxy(java.rmi.Remote proxy)
        Specified by:
        setProxy in interface MaxRemoteProxy
      • getMboRecordData

        public psdi.mbo.MboRecordData getMboRecordData()
        Returns the mbo record data as obtained from the database
      • setNewMbo

        public void setNewMbo(boolean flag)
                       throws java.rmi.RemoteException
        Turns on a flag to indicate that this is a new Mbo.
        Specified by:
        setNewMbo in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • getString

        public java.lang.String getString(java.lang.String attributeName,
                                          java.lang.String langCode)
                                   throws MXException,
                                          java.rmi.RemoteException
        Get the string of the attribute in the specified language. Empty string will be returned if no value for the specific language has be set to the attribute. The value is initially retrieved from the language table if the langcode is not either base language or the UserInfo's language.
        Specified by:
        getString in interface MboRemote
        Parameters:
        attributeName -
        langCode -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getString(String attributeName, String langCode)
      • getStringTransparent

        public java.lang.String getStringTransparent(java.lang.String attributeName,
                                                     java.lang.String langCode)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Returns the string in the specified language code if exists. If string value for the specific language doesn't exist, the base language's value will be returned. Unlike getString(), this method returns the base langauge string not the current user info's language string if there is no value for the specified language code.
        Specified by:
        getStringTransparent in interface MboRemote
        Parameters:
        attributeName -
        langCode -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getStringTransparent(String attributeName, String langCode)
      • getRelationshipNameToLangTable

        public java.lang.String getRelationshipNameToLangTable(java.lang.String attributeName)
                                                        throws MXException,
                                                               java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getDatabaseValue

        public java.lang.Object getDatabaseValue(java.lang.String attributeName)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Returns the value of the column at the time of databse fetch.
        Specified by:
        getDatabaseValue in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • setFetchIndex

        public void setFetchIndex(int index)
        Sets the fetch index. Note that this index is different from the MboSet's mbo index.
      • getFetchIndex

        public int getFetchIndex()
        Returns the fetch index.
      • setModified

        public void setModified(boolean modified)
        Marks the Mbo as Modified.
        Specified by:
        setModified in interface MboRemote
      • setModifiedForIntegrationOnly

        public void setModifiedForIntegrationOnly(boolean modified)
        Marks the Mbo as modified for integration purposes. Object may not have any modified persistent attributes, but framework needs to recognize parent Mbo as "modified" so that outbound transactions will be triggered by parent Mbo save.
      • setDeleted

        public void setDeleted(boolean deleted)
        Marks the Mbo as Deleted.
        Specified by:
        setDeleted in interface MboRemote
      • getName

        public java.lang.String getName()
        Return the name
        Specified by:
        getName in interface MboRemote
      • getRecordMboName

        public java.lang.String getRecordMboName()
                                          throws java.rmi.RemoteException,
                                                 MXException
        Returns the name of the Mbo if this record was in memory as the type is actually is. In most cases this returns the same as getName(). When a WOChange is read into a WO Mbo, getName will return "WORKORDER while getRecordMboName will return "WOCHANGE".
        Throws:
        MXException
        java.rmi.RemoteException
      • getUserInfo

        public UserInfo getUserInfo()
                             throws java.rmi.RemoteException
        Return the user info for the mbo
        Specified by:
        getUserInfo in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • init

        public void init()
                  throws MXException
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Throws:
        MXException
      • hasUniqueID

        public boolean hasUniqueID()
        If this MBO has a UniqueID column or not.
        Returns:
      • checkRecordLock

        protected void checkRecordLock()
                                throws MXException
        Checks the MAXRECORDLOCKCACHE if this Mbo is locked by another session. This method also clears and refreshes the RecordLockInfo JSON
        Throws:
        MXException
      • getUniqueIdentifer

        public java.lang.String getUniqueIdentifer()
                                            throws java.rmi.RemoteException,
                                                   MXException
        Returns the UniqueIdName and UniqueIdVlaue concaenated as a string and delimited by a space.
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • getLockedByDisplayName

        public java.lang.String getLockedByDisplayName()
                                                throws java.rmi.RemoteException,
                                                       MXException
        Returns the display name of the user who has this Mbo locked
        Specified by:
        getLockedByDisplayName in interface MboRemote
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
      • getLockedByUserID

        public java.lang.String getLockedByUserID()
        Returns the userid of the user who has this Mbo locked
        Returns:
      • initRelationship

        public void initRelationship(java.lang.String relationName,
                                     MboSetRemote mboSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Called whenever a relationship is initialized or reset from this Mbo to another MboSet. Programmers can override this method for custom handling of related objects. An example of this would be making the WPMATERIAL object read only if the status of the Work Order is CLOSED.
        Throws:
        MXException
        java.rmi.RemoteException
      • setReadonlyWhenParentIsReadonly

        public void setReadonlyWhenParentIsReadonly(java.lang.String relationshipName,
                                                    MboSetRemote mboSet,
                                                    boolean flag)
        This method should be called in initRelationship() if the passed mbo set is not going to set to readonly if the parent Mbo is readonly. If this method is not called for the mboset, the default behavior will be that the child mbo set will be set to readonly;
        Parameters:
        relationshipName -
        mboSet -
        flag - true if the child set needs to be set to readonly when parent is, false otherwise.
      • getClientLocale

        public java.util.Locale getClientLocale()
        Helper to get the locale of the client previously set for collection
      • getClientTimeZone

        public java.util.TimeZone getClientTimeZone()
        Helper to get the time zone of the client previously set for collection
      • getMboValue

        public MboValue getMboValue(java.lang.String nameInput)
                             throws MXException
        Return a MboValue object given the name. This version ignores multi-language. Throws an application exception if the attribute does not exist.
        Throws:
        MXException
        See Also:
        Mbo.getMboValue(String)
      • moveFieldFlagsToMboValue

        public void moveFieldFlagsToMboValue(MboValue mv)
        Internal method to move the flags set for the field on the Mbo to the mbovalue. This logic used to be done automatically when the mbovalue is instantiated. For performance reason we delay it until the flag is requested.
      • getInstanciatedMboValue

        public MboValue getInstanciatedMboValue(java.lang.String name)
        Return a MboValue object given the name, but only if it has been instanciated Returns null if no MboValue has been create with that name. Does not check to see if name is a name of an existing attribute.
      • getMboInitialValue

        public MaxType getMboInitialValue(java.lang.String name)
                                   throws MXException,
                                          java.rmi.RemoteException
        Returns the MaxType (initial value) object given the column name. Throws an application exception if the attribute does not exist.
        Specified by:
        getMboInitialValue in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getInstanciatedMboSet

        public MboSetRemote getInstanciatedMboSet(java.lang.String relationshipName)
        Returned a MboSet with the specified relationship name. This will only return the MboSetRemote object if it has already been instanciated, otherwise it will return null.
      • getRelatedSets

        protected java.util.Hashtable getRelatedSets()
        Returns the list of related MboSets in a hashtable. The key to the hash table is the relationship name.
      • clearRelatedSets

        protected void clearRelatedSets(java.util.HashSet namesToClear)
        Close and clear the named related (child) MboSets, and remove from hashtable.
        Parameters:
        namesToClear - The names of the child sets that should be cleared.
      • clearRelatedSets

        protected void clearRelatedSets()
        Close and clear related (child) MboSets, and remove from hashtable.
      • getMboValueData

        @TracePrimary
        public MboValueData getMboValueData(java.lang.String attribute)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Returns the MboValueData for the specified attribute. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.DESCRIPTION when the current object is WorkOrder ), this method first gets the correct object and then gets the appropriate mboValueDate from the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve the MboValueData from.
        Specified by:
        getMboValueData in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        Returns:
        the MboValueData associated with the attribute.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getMboValueData(String)
      • getMboValueData

        @TracePrimary
        public MboValueData getMboValueData(java.lang.String attribute,
                                                          boolean ignoreFieldFlags)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Overloaded method of getMboValueData() to take a flag indicating if the logic of attribute readonlyness can be ignored. This is a method used by SqlFormat when the readonlyness of a value is not needed to know.
        Specified by:
        getMboValueData in interface MboRemote
        Parameters:
        attribute -
        ignoreFieldFlags -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getMboValueData

        @TracePrimary
        public MboValueData[] getMboValueData(java.lang.String[] attribute)
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Returns an array of MboValue objects for the specified attributes. If an attribute does not exist, or there is no current relationship to another mbo reference (e.g. asset.description), the entry in the array will be null for the position in the array for that particular attribute. That is, "Attribute {0} does not exist" exception will NOT be thrown if the attribute does not exist in the object.
        Specified by:
        getMboValueData in interface MboRemote
        Parameters:
        attributeName - The array of attribute names within the current object.
        Returns:
        An array of MboValueData objects where each MboValueData corresponds to the each attribute in the passed array of attributes.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getMboValueData(String[])
      • getMboData

        public MboData getMboData(java.lang.String[] attributes)
        Return a MboData object for the specified list of attributes.
        Specified by:
        getMboData in interface MboRemote
      • getMboForAttribute

        public MboRemote getMboForAttribute(java.lang.String attributeName)
                                     throws MXException,
                                            java.rmi.RemoteException
        Take a attribute name (which may have a . notation and return the relevant MboRemote to use to get the attribute. The string in front of a . can be a relationship name or &owner& keyword. This is used when the programmer does a get/set value on an attribute such as asset.description. This routine will use the equipment relation as return an asset mbo which can then be used to get the value of the description.
        Throws:
        MXException
        java.rmi.RemoteException
      • getMboForAttributeStatic

        public MboRemote getMboForAttributeStatic(java.lang.String attributeName)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Take a attribute name (which may have a . notation and return the relevant MboRemote to use to get the attribute. If there is no MBO in the database, a zombie will be returned.
        Throws:
        MXException
        java.rmi.RemoteException
      • getList

        public MboSetRemote getList(java.lang.String attribute)
                             throws MXException,
                                    java.rmi.RemoteException
        Get the list of valid values for the attribute. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.DESCRIPTION when the current object is WorkOrder ), this method first gets the correct object and then gets a list of valid values associated with the attribute. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        getList in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        Returns:
        the set of valid objects for the attribute; null if no elements found for the attribute.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getList(String)
      • smartFill

        @TracePrimary
        public MboSetRemote smartFill(java.lang.String attribute,
                                                    java.lang.String value,
                                                    boolean exact)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Similar to getList(). The list returned by this method will use the value passed in to set the QBE in the corresponding field of the lookup MBO set. Comparing to getList(), the list returned will be smaller. If there is only one MBO in the set, its values from approriate fields will be set to the attribute of this MBO as well as other attributes composing the foreign key is necessary. The target and source attributes mapping is obtained in the order of java implementation in the field validation class, the MAXLOOKUPMAP table and then defaulted by the lookup MBO's primary columns.
        Specified by:
        smartFill in interface MboRemote
        Parameters:
        attribute -
        value - The QBE value to narrow down the lookup.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getList(java.lang.String)
      • smartFind

        @TracePrimary
        public MboSetRemote smartFind(java.lang.String attribute,
                                                    java.lang.String value,
                                                    boolean exact,
                                                    boolean isRecordHover)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Similar to getList(). The list returned by this method will use the value passed in to set the QBE in the corresponding field of the lookup MBO set. Comparing to getList(), the list returned will be smaller. If there is only one MBO in the set, its values from approriate fields will not be set to the attribute of this MBO as well as other attributes composing the foreign key is necessary. The target and source attributes mapping is obtained in the order of java implementation in the field validation class, the MAXLOOKUPMAP table and then defaulted by the lookup MBO's primary columns.
        Specified by:
        smartFind in interface MboRemote
        Parameters:
        attribute -
        value - The QBE value to narrow down the lookup.
        exact - QBE will use exact match.
        isRecordHover - smart find is for record hover display
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getList(java.lang.String)
      • smartFind

        public MboSetRemote smartFind(java.lang.String attribute,
                                      java.lang.String value,
                                      boolean exact)
                               throws MXException,
                                      java.rmi.RemoteException
        Similar to getList(). The list returned by this method will use the value passed in to set the QBE in the corresponding field of the lookup MBO set. Comparing to getList(), the list returned will be smaller. If there is only one MBO in the set, its values from approriate fields will not be set to the attribute of this MBO as well as other attributes composing the foreign key is necessary. The target and source attributes mapping is obtained in the order of java implementation in the field validation class, the MAXLOOKUPMAP table and then defaulted by the lookup MBO's primary columns.
        Specified by:
        smartFind in interface MboRemote
        Parameters:
        attribute -
        value - The QBE value to narrow down the lookup.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getList(java.lang.String)
      • smartFindByObjectName

        public MboSetRemote smartFindByObjectName(java.lang.String sourceObj,
                                                  java.lang.String targetAttrName,
                                                  java.lang.String value,
                                                  boolean exact,
                                                  java.lang.String[][] cachedKeyMap)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Find a set of records of the object of the specified the application by the specifyed attribute and values of the current record. The foreign key mapping of the current record and the object to be found is provided by the parameter.
        Specified by:
        smartFindByObjectName in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • smartFindByObjectNameDirect

        public MboSetRemote smartFindByObjectNameDirect(java.lang.String sourceObj,
                                                        java.lang.String targetAttrName,
                                                        java.lang.String value,
                                                        boolean exact)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Find a set of records of the object of the specified the application by the specifyed attribute and values of the current record. This method doesn't check field validation's smartFind first. The key mapping is first obtained from maxlookupmap and if it doesn't exist, it looks into the primary keys and tries to figure out. Exception will be thrown if key mapping cannot be obtained.
        Specified by:
        smartFindByObjectNameDirect in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • smartFindByObjectName

        public MboSetRemote smartFindByObjectName(java.lang.String sourceObj,
                                                  java.lang.String targetAttrName,
                                                  java.lang.String value,
                                                  boolean exact)
                                           throws MXException,
                                                  java.rmi.RemoteException
        Find a set of records of the object of the specified the application by the specifyed attribute and values of the current record. It first ask the field validation to find the set. If field validation doesn't have it implemented, it finds the key mapping and proceeds by the values of the current records which act as foreign keys to the object.
        Specified by:
        smartFindByObjectName in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getString

        public java.lang.String getString(java.lang.String attributeName)
                                   throws MXException,
                                          java.rmi.RemoteException
        Retrieves the string value of the attribute identified by name within the current object. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.TOTALCOST when the current object is WorkOrder ), this method first gets the correct object and then retrieves the string value of the attribute from it. In the asset.TOTALCOST case, the appropriate object to retrieve the string value of TOTALCOST from should not be "WorkOrder". Rather, it should be an asset object obtained from the relationship "ASSET" where workorder.assetnum=asset.assetnum. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        getString in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object. Valid data types for the attribute include UPPPER,LOWER,GL,ALN,LONGALN,DURATION, DATE,DATETIME,TIME,YORN,INTEGER,SMALLINT,BIGINT, AMOUNT,DECIMAL,and FLOAT.
        Returns:
        the string value of the attribute in locale format.
        Throws:
        MXException - "Invalid Data Type" exception will be thrown if the attribute is of datatype other than UPPPER,LOWER,GL,ALN,LONGALN,DURATION, DATE,DATETIME,TIME,YORN,INTEGER,SMALLINT,BIGINT, AMOUNT,DECIMAL,or FLOAT. "Attribute {0}" does not exist exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getString(String)
      • getBoolean

        public boolean getBoolean(java.lang.String attributeName)
                           throws MXException,
                                  java.rmi.RemoteException
        Retrieves the boolean value of the attribute identified by name within the current object. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.CHILDREN when the current object is WorkOrder ), this method first gets the correct object and then retrieves the boolean value of the attribute from it. In the asset.CHILDREN case, the appropriate object to retrieve the boolean value of CHILDREN from should not be "WorkOrder". Rather, it should be an asset object obtained from the relationship "ASSET" where workorder.assetnum=asset.assetnum. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        getBoolean in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object. Valid data types for the attribute should be YORN.
        Returns:
        the boolean value of the attribute.
        Throws:
        MXException - "Invalid Data Type" exception will be thrown if the attribute is of datatype other than YORN. "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getBoolean(String)
      • getByte

        public byte getByte(java.lang.String attributeName)
                     throws MXException,
                            java.rmi.RemoteException
        Retrieves an attribute value identified by name within the current object
        Specified by:
        getByte in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getInt

        public int getInt(java.lang.String attributeName)
                   throws MXException,
                          java.rmi.RemoteException
        Retrieves the integer value of the attribute identified by name within the current object. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.TOTALCOST when the current object is WorkOrder ), this method first gets the correct object and then retrieves the integer value of the attribute from it. In the asset.TOTALCOST case, the appropriate object to retrieve the integer value of TOTALCOST from should not be "WorkOrder". Rather, it should be an asset object obtained from the relationship "ASSET" where workorder.assetnum=asset.assetnum. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        getInt in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object. Valid data types for the attribute include INTEGER,SMALLINT,BIGINT,DECIMAL,FLOAT,DURATION,and AMOUNT.
        Returns:
        the integer value of the attribute;0.0 if the value is null.
        Throws:
        MXException - "Invalid Data Type" exception will be thrown if the attribute is of data type other than INTEGER,SMALLINT,BIGINT,DECIMAL,FLOAT,DURATION,or AMOUNT. "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getInt(String)
      • getLong

        public long getLong(java.lang.String attributeName)
                     throws MXException,
                            java.rmi.RemoteException
        Retrieves the long value of the attribute identified by name within the current object. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.TOTALCOST when the current object is WorkOrder ), this method first gets the correct object and then retrieves the long value of the attribute from it. In the asset.TOTALCOST case, the appropriate object to retrieve the long value of TOTALCOST from should not be "WorkOrder". Rather, it should be an asset object obtained from the relationship "ASSET" where workorder.assetnum=asset.assetnum. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        getLong in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object. Valid data types for the attribute include INTEGER,SMALLINT,BIGINT,DECIMAL,FLOAT,DURATION,and AMOUNT.
        Returns:
        the long value of the attribute; 0.0 if the value is null.
        Throws:
        MXException - "Invalid Data Type" exception will be thrown if the attribute is of datatype other than INTEGER,SMALLINT,BIGINT,DECIMAL,FLOAT,DURATION,or AMOUNT. "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getLong(String)
      • getFloat

        public float getFloat(java.lang.String attributeName)
                       throws MXException,
                              java.rmi.RemoteException
        Retrieves the float value of the attribute identified by name within the current object. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.TOTALCOST when the current object is WorkOrder ), this method first gets the correct object and then retrieves the float value of the attribute from it. In the asset.TOTALCOST case, the appropriate object to retrieve the float value of TOTALCOST from should not be "WorkOrder". Rather, it should be an asset object obtained from the relationship "ASSET" where workorder.assetnum=asset.assetnum. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        getFloat in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object. Valid data types for the attribute include DECIMAL,FLOAT,DURATION,AMOUNT,INTEGER,BIGINT,and SMALLINT.
        Returns:
        the float value of the attribute; 0.0 if the value is null.
        Throws:
        MXException - Invalid Data Type exception will be thrown if the attribute is of datatype other than DECIMAL,FLOAT,DURATION,AMOUNT,INTEGER,BIGINT,or SMALLINT. Attribute {0} does not exist exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getFloat(String)
      • getDouble

        public double getDouble(java.lang.String attributeName)
                         throws MXException,
                                java.rmi.RemoteException
        Retrieves the double value of the attribute identified by name within the current object. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.TOTALCOST when the current object is WorkOrder ), this method first gets the correct object and then retrieves the double value of the attribute from it. In the asset.TOTALCOST case, the appropriate object to retrieve the double value of TOTALCOST from should not be "WorkOrder". Rather, it should be an asset object obtained from the relationship "ASSET" where workorder.assetnum=asset.assetnum. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        getDouble in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object. Valid data types for the attribute include DECIMAL,FLOAT,DURATION,AMOUNT,INTEGER,BIGINT,and SMALLINT.
        Returns:
        the double value of the attribute; 0.0 if the value is null.
        Throws:
        MXException - "Invalid Data Type" exception will be thrown if the attribute is of datatype other than DECIMAL,FLOAT,DURATION,AMOUNT,INTEGER,BIGINT,and SMALLINT. "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getDouble(String)
      • getDate

        public java.util.Date getDate(java.lang.String attributeName)
                               throws MXException,
                                      java.rmi.RemoteException
        Retrieves the date value of the attribute identified by name within the current object. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.STATUSDATE when the current object is WorkOrder ), this method first gets the correct object and then retrieves the date value of the attribute from it. In the asset.STATUSDATE case, the appropriate object to retrieve the date value of STATUSDATE from should not be "WorkOrder". Rather, it should be an asset object obtained from the relationship "ASSET" where workorder.assetnum=asset.assetnum. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        getDate in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object. Valid data types for the attribute should be DATETIME,DATE,TIME.
        Returns:
        the date value of the attribute.
        Throws:
        MXException - "Invalid Data Type" exception will be thrown if the attribute is of datatype other than DATETIME,DATE,TIME. "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.getDate(String)
      • getBytes

        public byte[] getBytes(java.lang.String attributeName)
                        throws MXException,
                               java.rmi.RemoteException
        Retrieves an attribute value identified by name within the current object
        Specified by:
        getBytes in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • setValue

        public void setValue(java.lang.String attributeName,
                             java.lang.String val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a string value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.DESCRIPTION when the current object is WorkOrder ), this method first gets the correct object and then assigns the string value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the string value to the attribute specified. For synonym value attributes (string datatype), the value can be passed with the "!" prefix and suffix, and this function will substitute the appropriate translated external default value for the attribute. for example: "!WAPPR!" will update the field contents with the synonym value of WAPPR. For Async error reporting we catch the exception and persist the current value used to set the value and also the exception generated.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a string value of characters to an attribute which has datatype of YORN.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,String,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             MaxType mboValue,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Set the value based on the MaxType object passed in. The type of the MaxType and the attribute whose value is to be set has to match. The value will be dirived from the MaxType object and set to the Mbo value. same fields.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName -
        mboValue -
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,MaxType,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             java.lang.String val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a string value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The string value to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,String,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             boolean val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a boolean value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.CHILDREN when the current object is WorkOrder ), this method first gets the correct object and then assigns the boolean value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the boolean value to the attribute specified. This will use the Y or N values for the server location. In order to avoid ambiguity, the client should call setValue() passing a boolean value, rather than a string. This setValue operation of a boolean value can only be applied to attributes that have data type of YORN.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The boolean value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a boolean value to an attribute which has datatype of FLOAT.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,boolean)
      • setValue

        public void setValue(java.lang.String attributeName,
                             boolean val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a boolean value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The boolean value to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,boolean,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             byte val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a byte value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The byte value to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,byte,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             byte val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a byte value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.CHILDREN when the current object is WorkOrder ), this method first gets the correct object and then assigns the byte value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the byte value to the attribute specified.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The byte value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a byte value to an attribute which has datatype of DATETIME.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,byte,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             int val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets an integer value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The integer value to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,int,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             int val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets an integer value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.PRIORITY when the current object is WorkOrder ), this method first gets the correct object and then assigns the integer value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the integer value to the attribute specified. Valid data types of the attribute for this setValue operation include INTEGER,SMALLINT,BIGINT,DECIMAL,FLOAT,DURATION,and AMOUNT.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The integer value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting an integer value to an attribute which has datatype of YORN or DATETIME.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,int,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             float val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a float value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The float value to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,float,long)
      • setValue

        @TracePrimary
        public void setValue(java.lang.String attributeName,
                                           float val,
                                           long accessModifier)
                                    throws MXException,
                                           java.rmi.RemoteException
        Sets a float value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.PRIORITY when the current object is WorkOrder ), this method first gets the correct object and then assigns the float value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the float value to the attribute specified. Valid data types of the attribute for this setValue operation include DECIMAL,FLOAT,DURATION,AMOUNT,INTEGER,BIGINT,and SMALLINT.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The float value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a float value to an attribute which has data type of YORN or DATETIME.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,float,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             byte[] val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets an array of byte values to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The array of byte values to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,byte[],long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             byte[] val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets an array of byte values to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.CHILDREN when the current object is WorkOrder ), this method first gets the correct object and then assigns the array of byte values to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the array of byte values to the attribute specified.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The array of byte values to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a byte value to an attribute which has datatype of DATETIME.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,byte[],long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             java.util.Date val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a date value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The date value to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,java.util.Date,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             java.util.Date val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a java.util.Date value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.STATUSDATE when the current object is WorkOrder ), this method first gets the correct object and then assigns the java.util.Date value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the java.util.Date value to the attribute specified. Valid data types of the attribute for this setValue operation include DATETIME,DATE,TIME.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The java.util.Date value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a Date value to an attribute which has datatype of YORN.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,java.util.Date,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             short val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a short value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The short values to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,short,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             short val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a short value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.PRIORITY when the current object is WorkOrder ), this method first gets the correct object and then assigns the short value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the short value to the attribute specified.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The short value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a short value to an attribute which has datatype of DATETIME.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,short,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             long val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a long value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The long values to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,long,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             long val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a long value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.PRIORITY when the current object is WorkOrder ), this method first gets the correct object and then assigns the long value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the long value to the attribute specified. Valid data types of the attribute for this setValue operation include DECIMAL,FLOAT,DURATION,AMOUNT,INTEGER,BIGINT,and SMALLINT.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The long value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a long value to an attribute which has data type of YORN or DATETIME.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,long,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             double val)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a double value to an attribute identified by name within the current object.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The double values to set to the attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,double,long)
      • setValue

        public void setValue(java.lang.String attributeName,
                             double val,
                             long accessModifier)
                      throws MXException,
                             java.rmi.RemoteException
        Sets a double value to an attribute identified by name within the current object and access to the value is controlled by the access modifier. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.TOTALCOST when the current object is WorkOrder ), this method first gets the correct object and then assigns the double value to the attribute of the right object. If the attributeName does not contain a ".", the current object is assumed to be the one to set the double value to the attribute specified. Valid data types of the attribute for this setValue operation include DECIMAL,FLOAT,DURATION,AMOUNT,INTEGER,BIGINT,and SMALLINT.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        val - The double value to set to the attribute.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK. "Invalid Data Type" exception will be thrown for datatype mismatch. For example, setting a double value to an attribute which has data type of YORN or DATETIME.
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String,double,long)
      • isNull

        public boolean isNull(java.lang.String attributeName)
                       throws MXException,
                              java.rmi.RemoteException
        Determines whether the attribute value identified by name within the current object is null. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.DESCRIPTION when the current object is WorkOrder ), this method first gets the correct object and then checks if the attribute is null or not. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        isNull in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        Returns:
        true if the attribute is currently null;false otherwise.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.isNull(String)
      • setValueNull

        public void setValueNull(java.lang.String attributeName)
                          throws MXException,
                                 java.rmi.RemoteException
        Sets an attribute value identified by name null with no access modifiers.
        Specified by:
        setValueNull in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValueNull(String,long)
      • setValueNull

        public void setValueNull(java.lang.String attributeName,
                                 long accessModifier)
                          throws MXException,
                                 java.rmi.RemoteException
        Sets an attribute value identified by name within the current object to null using the specified access modifiers. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.DESCRIPTION when the current object is WorkOrder ), this method first gets the correct object and then sets the attribute to null for the appropriate object. If the attributeName does not contain a ".", the current object is assumed to be the one to set null to the attribute specified.
        Specified by:
        setValueNull in interface MboRemote
        Parameters:
        attributeName - The attribute name within the current object.
        accessModifier - The bitwise flags such as NOACCESSCHECK, NOVALIDATION_AND_NOACTION, and DELAYVALIDATION.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object. "Field is read only" exception will be thrown if the attribute is READONLY and the accessModifier does not specify NOACCESSCHECK.
        java.rmi.RemoteException
        See Also:
        Mbo.setValueNull(String,long)
      • getRecordIdentifer

        public java.lang.String getRecordIdentifer()
                                            throws MXException,
                                                   java.rmi.RemoteException
        Generate a string text composed of object name, key names and values to identify the MBO object. For exampe PR PRNUM=1000, SITE ID=BEDFORD.
        Specified by:
        getRecordIdentifer in interface MboRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mbo.Mbo#getRecordIdentifier(String attributeName, String langCode, String value, long accessModifier)
      • isAutoKeyed

        public boolean isAutoKeyed(java.lang.String attributeName)
                            throws MXException,
                                   java.rmi.RemoteException
        Returns whether the given attribute name is autokeyed or not whenever a new mbo is created.
        Specified by:
        isAutoKeyed in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name,
                                      java.lang.String objectName)
                               throws MXException,
                                      java.rmi.RemoteException
        Create or retrieve an MboSet. Upon first call to this method with a name string which has not been seen or stored since the last commit, a new MboSet will be instanciated. Any subsequent calls to this method using the same name will return the currently instanciated set. Therefore, if where clauses have been attached and reset, they will have been applied and reflected in the returned set. This method allows programmer to retrieve a named set WITHOUT access to or knowledge of any where clauses which may or may not have been applied.
        Specified by:
        getMboSet in interface MboRemote
        Parameters:
        name - The name caller would like to associate with the MboSet about to be retrieved/created.
        objectName - The database object which should be queried using any provided where clause.
        Returns:
        The MboSet found(if previously created) or created(if not found) with the name provided.
        Throws:
        MXException - "Unknown Object" exception will be thrown if the passed object does not exist.
        java.rmi.RemoteException
        See Also:
        Mbo.getMboSet(String,String)
      • getMboSet

        @TracePrimary
        public MboSetRemote getMboSet(java.lang.String name,
                                                    java.lang.String objectName,
                                                    java.lang.String relationship)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Retrieve the named(1st parameter) Mboset if it has been instanciated or create a new MboSet using the name(1st parameter) if it has not been instanciated. To determine if the set has been instanciated or not, this method reviews the where clause(3rd parameter) to determine if it is the very same where clause last applied to this set. If the where clause has changed since last calling this method, the MboSet will be reset and the where clause will be re-applied before a reference is returned. If the named object has never been created since the last commit, it will be instanciated with the provided where clause,storing the provided name against the object of interest.
        Specified by:
        getMboSet in interface MboRemote
        Parameters:
        name - The name caller would like to associate with the MboSet about to be retrieved/created.
        objectName - The database object which should be queried using any provided where clause.
        relationship - The where clause to be applied to reset the mboSet of interest.
        Returns:
        The MboSet found(if previously created) or created(if not found) with the name provided using where clause against the object.
        Throws:
        MXException - "Unknown Object" exception will be thrown if the passed object does not exist.
        java.rmi.RemoteException
        See Also:
        Mbo.getMboSet(String,String,String)
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name)
                               throws MXException,
                                      java.rmi.RemoteException
        Get a related MboSet for the object using the named relationship. Used for cross object linking; for example,Work Order to Asset.
        Specified by:
        getMboSet in interface MboRemote
        Parameters:
        name - The relationship provided to retrieve a related mboSet, usually using foreign keys. For example, "psdi.app.workorder.WOSetRemote.ASSET" is a relationship for the work order object to access the asset Set where "workorder.assetnum=asset.assetnum". The relationship can also be chained. Such as ASSET.ASSETSTATUS.
        Returns:
        The returned related set specified through the relationship.
        Throws:
        MXException - "A relationship called {0} does not exist for the {1} business object" exception will be thrown if the relationship was not found. "Unknown Object" exception will be thrown if the database object can not be found through the relationship.
        java.rmi.RemoteException
        See Also:
        Mbo.getMboSet(String)
      • getMboDataSet

        public java.util.Vector getMboDataSet(java.lang.String relationship)
                                       throws java.rmi.RemoteException,
                                              MXException
        Returns a set of Mbos using the dot notation relationships.
        Specified by:
        getMboDataSet in interface MboRemote
        Parameters:
        mbo - The mbo to fetch the related MboSet from.
        relationship - The dot notation relationships.
        Returns:
        A vector of Mbos.
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.mbo.Mbo#getMboDataSet(MboRemote, String)
      • save

        @TracePrimary
        protected void save()
                                   throws MXException,
                                          java.rmi.RemoteException
        Save the object and other linked objects. Subclasses can code their save() logic to include any appropriate updates to other linked objects and call super.save().
        Throws:
        MXException
        java.rmi.RemoteException
      • commit

        protected void commit()
      • isValid

        public boolean isValid()
        Is this a valid object ?
      • isZombie

        public boolean isZombie()
        Returns whether the Mbo is a Zombie mbo or not.
        Specified by:
        isZombie in interface MboRemote
      • setForDM

        public void setForDM(boolean forDM)
                      throws java.rmi.RemoteException
        Specified by:
        setForDM in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • isForDM

        public boolean isForDM()
                        throws java.rmi.RemoteException
        Specified by:
        isForDM in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • setTenantIdForNoMboRecordData

        public void setTenantIdForNoMboRecordData(int tenantId)
                                           throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • getTenantIdForNoMboRecordData

        public int getTenantIdForNoMboRecordData()
                                          throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Mark the object to be deleted depending on the access modifier. This will usually be overridden in the subclass of Mbo as there may be application specific rules as to if and when an object can be deleted. Object is not actually deleted in the database until save() is called. This method will also mark all associated Long Description and Translation Mbos for deletion.
        Specified by:
        delete in interface MboRemote
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • delete

        public void delete()
                    throws MXException,
                           java.rmi.RemoteException
        Mark the object to be deleted with all the normal security checks. An object can be successfully marked delete only when it is not flagged NODELETE, the current set it belongs to is not being flagged NODELETE, and it passes all the checks in its canDelete method.

        Please note that if you need to apply application specific rules when an object is being deleted, please overwrite method delete(long) instead of this one in the derived class.

        Specified by:
        delete in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Can the object be deleted ? This is object specific and should be overridden.
        Throws:
        MXException
        java.rmi.RemoteException
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Unmark the Mbo for deletion. Can only be called after a delete() and before the save() has been performed. This method will also unmark associated Long Description and Translation Mbos.
        Specified by:
        undelete in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • toBeDeleted

        public boolean toBeDeleted()
        Is the Mbo to be deleted from storage ?
        Specified by:
        toBeDeleted in interface MboRemote
      • toBeAdded

        public boolean toBeAdded()
        Is the Mbo to added to storage ?
        Specified by:
        toBeAdded in interface MboRemote
      • isNew

        public boolean isNew()
                      throws java.rmi.RemoteException
        Returns whether the mbo is new or not.
        Specified by:
        isNew in interface MboRemote
        Returns:
        true, if the mbo is new (i.e. created by calling add() or insert() methods), otherwise false.
        Throws:
        java.rmi.RemoteException
      • toBeUpdated

        public boolean toBeUpdated()
                            throws java.rmi.RemoteException
        Is the Mbo to be updated in storage ?
        Specified by:
        toBeUpdated in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • thisToBeUpdated

        public boolean thisToBeUpdated()
                                throws java.rmi.RemoteException
        Is the Mbo to be updated in storage ?
        Specified by:
        thisToBeUpdated in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • isModified

        public boolean isModified()
        Has the data in the object been changed? An object is modified if one or more of its attributes have been changed.
        Specified by:
        isModified in interface MboRemote
        Returns:
        true if the object has been modified; false otherwise.
        See Also:
        Mbo.isModified()
      • isModified

        public boolean isModified(java.lang.String attribute)
                           throws MXException,
                                  java.rmi.RemoteException
        Has the data in the attribute changed? An attribute is modified if data is changed through one of the setValue methods.
        Specified by:
        isModified in interface MboRemote
        Returns:
        true if the attribute has been modified; false otherwise.
        Throws:
        MXException
        java.rmi.RemoteException
      • setESigFieldModified

        public void setESigFieldModified(boolean eSigFieldModified)
                                  throws java.rmi.RemoteException
        Sets whether any of the fields enabled for electronic signature are modified by the user.
        Specified by:
        setESigFieldModified in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • isESigFieldModified

        public boolean isESigFieldModified()
        Indicates whether any of the fields enabled for electronic signature are modified by the user.
      • setEAuditFieldModified

        public void setEAuditFieldModified(boolean eAuditFieldModified)
                                    throws java.rmi.RemoteException
        Sets whether any of the fields enabled for electronic audit are modified by the user.
        Throws:
        java.rmi.RemoteException
      • isEAuditFieldModified

        public boolean isEAuditFieldModified()
        Indicates whether any of the fields enabled for electronic audit are modified by the user.
      • toBeValidated

        public boolean toBeValidated()
                              throws java.rmi.RemoteException
        Does the object need validating ? This will also check linked objects.
        Specified by:
        toBeValidated in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • toBeSaved

        public boolean toBeSaved()
                          throws java.rmi.RemoteException
        Does the object need to be saved to persistent storage ? This will also check linked objects.
        Specified by:
        toBeSaved in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Pre-save validation method. Programmer can override with specific rules.
        Throws:
        MXException
        java.rmi.RemoteException
      • isApiBatchError

        public boolean isApiBatchError()
      • checkQualifiedRestriction

        public void checkQualifiedRestriction()
                                       throws MXException,
                                              java.rmi.RemoteException
        Check whether the to be saved record is qualified by the QUALIFIED data restriction if any.
        Throws:
        MXException
        java.rmi.RemoteException
      • orEvaluateConditions

        public boolean orEvaluateConditions(DataRestrictionCache.RestrictionBundle restrictions)
                                     throws MXException,
                                            java.rmi.RemoteException
        Evaluate the restrictions according to a OR logic. If both across group restrictions are true and at least one of the group level restriction is true, it returns true. This is not the directly opposite to andEvaluateCondition().
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • useDataSecurity

        public boolean useDataSecurity(java.lang.String group)
                                throws MXException,
                                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • andEvaluateConditions

        public boolean andEvaluateConditions(DataRestrictionCache.RestrictionBundle restrictions)
                                      throws MXException,
                                             java.rmi.RemoteException
        Evaluate a bundle of restrictions. It returns true if any of the accross group restriction is true. If cross group restriction is false, it returns true only if all the restriction of all the groups are true.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • throwRequiredException

        protected final void throwRequiredException(MXException mxe,
                                                    MboValueInfo mvi,
                                                    MboValue mv)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Called from validate when a required field has null value.
        Parameters:
        mex - MXException
        mvi - MboValueInfo
        mv - MboValue
        Throws:
        MXException
        java.rmi.RemoteException
      • validateAttributes

        public java.util.Hashtable validateAttributes()
                                               throws java.rmi.RemoteException
        Go through the attributes of this Mbo in the order specified by getValidateOrder(). Collect up the errors and return them in the Hashtable where the 'key' is the field name and the 'value' is the exception caught when trying to validate it.
        Specified by:
        validateAttributes in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Returns a String[] of field names. The validate and batchValidate() method will test the fields' validations in this order.
      • setDatabaseDefaultValues

        protected final void setDatabaseDefaultValues()
                                               throws MXException
        Called by the framework to set field defaults that have been set by the user in the data dictionary. The add() method is then called which can be overridden in the actual Mbo implementation. If autokey is enabled, autokey will be set.
        Throws:
        MXException
      • setDatabaseDefaultValues

        protected final void setDatabaseDefaultValues(boolean setAutoKey)
                                               throws MXException
        Called by the framework to set field defaults that have been set by the user in the data dictionary. The add() method is then called which can be overridden in the actual Mbo implementation. If invalid defaults have been set, this routine will fail quietly ! If invalid defaults have been set, this routine will fail quietly ! If setAutoKey is true, the autokey will be set if autokey is enabled for the key field. Otherwise, it will be left blank
        Throws:
        MXException
      • getInsertItemSetId

        public java.lang.String getInsertItemSetId()
                                            throws MXException,
                                                   java.rmi.RemoteException
        Returns the default item set id to be applied to a new mbo.
        Specified by:
        getInsertItemSetId in interface MboRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getInsertCompanySetId

        public java.lang.String getInsertCompanySetId()
                                               throws MXException,
                                                      java.rmi.RemoteException
        Returns the default company set id to be applied to a new mbo.
        Specified by:
        getInsertCompanySetId in interface MboRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getInsertSite

        public java.lang.String getInsertSite()
                                       throws MXException,
                                              java.rmi.RemoteException
        Returns the default site to be applied to a new mbo.
        Specified by:
        getInsertSite in interface MboRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getInsertOrgForSite

        public java.lang.String getInsertOrgForSite(java.lang.String site)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Returns the default site to be applied to a new mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • getInsertOrganization

        public java.lang.String getInsertOrganization()
                                               throws MXException,
                                                      java.rmi.RemoteException
        Returns the default orgid to be applied to a new mbo.
        Specified by:
        getInsertOrganization in interface MboRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getOrgSiteForMaxvar

        public java.lang.String getOrgSiteForMaxvar(java.lang.String maxvarName)
                                             throws MXException,
                                                    java.rmi.RemoteException
        Returns org or site for getting maxvar
        Specified by:
        getOrgSiteForMaxvar in interface MboRemote
        Parameters:
        maxvarName -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        This is called when a new Mbo is added to the Mboset collection. It is called AFTER user defaults have been set from the data dictionary. Programmer should usually override this to set some defaults. Default behavior is to do nothing.
        Specified by:
        add in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        This called whenever a change is made to the attributes of a MBO. The programmer should override if interested in intercepting this event. An example of the use of this is to set the changeby/changedate of a work order whenever one of the attributes is set. If an MXException is thrown from this routine, the change of value is rolled back, this provides a mechanism to abort any changes. Default behavior is to do nothing. The derived method has to call super.modify().
        Throws:
        MXException
        java.rmi.RemoteException
      • valueChanged

        public void valueChanged()
                          throws MXException,
                                 java.rmi.RemoteException
        A field value has changed. Different than modify(), no strings attached, as long as a field has been set to a different value, this method is called, including non-persistent field.
        Throws:
        MXException
        java.rmi.RemoteException
      • getMboServer

        public MboServerInterface getMboServer()
        Helper function to return the MboServer of the owning collection
      • getMboSetInfo

        protected MboSetInfo getMboSetInfo()
        Return information about the object
      • getMboSetInfo

        public MboSetInfo getMboSetInfo(java.lang.String mboName)
        Return information about the passed object
      • getTranslator

        public Translate getTranslator()
        Return the translator object which can be used to convert locale sensitive strings
      • getFlags

        public long getFlags()
        Deprecated. Replaced by isFlagSet(flag)
        Return all the flags for this mbo
        Specified by:
        getFlags in interface MboRemote
        See Also:
        Mbo.isFlagSet(long)
      • setFlag

        public void setFlag(long flag,
                            boolean state)
        Set the Mbo flags to the specified values. Flags that are usually set at the mbo level are NOUPDATE, NODELETE. READONLY can be used to make the object totally read only (i.e. no updates, no deletes). Setting the flag will not overwrite the flags set by the security restriction.
        Specified by:
        setFlag in interface MboRemote
      • setFlag

        public void setFlag(long flag,
                            boolean state,
                            MXException mxe)
        Set the Mbo flags to the specified values. Flags that are usually set at the mbo level are NOUPDATE, NODELETE. READONLY can be used to make the object totally read only (i.e. no updates, no deletes). THis one also specifies the Exception to be thrown at Mbo Level.
        Specified by:
        setFlag in interface MboRemote
      • isFlagSet

        public boolean isFlagSet(long flag)
        Return the state of the specified mbo flag
        Specified by:
        isFlagSet in interface MboRemote
      • evaluateRestriction

        public boolean evaluateRestriction(DataRestriction restriction)
                                    throws MXException,
                                           java.rmi.RemoteException
        Evaluate the restriction by its ID. If re-evaluate is false or the mbo hasn't been modified since last evaluation, the evaluate result returns the value from the last evaluation.
        Parameters:
        restrictionID -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getAttrRestrictionFlag

        public BitFlag getAttrRestrictionFlag(java.lang.String attr)
        Get the bit flag set by the attribute restriction. This method is called when the field flag is requested the first time for this attribute. Don't call this method directly, instead, call getFlag().
        Returns:
      • getRowRestrictionFlag

        public BitFlag getRowRestrictionFlag()
        Get the bit flag set by the attribute restriction. This method is called when the field flag is requested the first time for this attribute. Don't call this method directly, instead, call getFlag().
        Returns:
      • getFieldExceptions

        public java.util.Hashtable getFieldExceptions()
        Return the hashtable of field Exceptions
      • setFieldFlag

        public void setFieldFlag(java.lang.String name,
                                 long flag,
                                 boolean state)
        For the specified field, set the flag to a state. This does not instanciate a MboValue so should be used whenever possible.
        Specified by:
        setFieldFlag in interface MboRemote
      • setFieldFlag

        public void setFieldFlag(java.lang.String name,
                                 long flag,
                                 boolean state,
                                 MXException mxe)
        For the specified field, set the flag to a state. This does not instanciate a MboValue so should be used whenever possible. This also specifies the MXException at the MboValue level.
        Specified by:
        setFieldFlag in interface MboRemote
      • setFieldFlag

        public void setFieldFlag(java.lang.String[] names,
                                 long flag,
                                 boolean state)
        For the specified fields, set the flag to a state. This does not instanciate a MboValue so should be used whenever possible.
        Specified by:
        setFieldFlag in interface MboRemote
      • setFieldFlag

        public void setFieldFlag(java.lang.String[] names,
                                 long flag,
                                 boolean state,
                                 MXException mxe)
        For the specified fields, set the flag to a state. This does not instanciate a MboValue so should be used whenever possible. Also set the MXException too.
        Specified by:
        setFieldFlag in interface MboRemote
      • setFieldFlag

        public void setFieldFlag(java.lang.String[] names,
                                 boolean inclusive,
                                 long flag,
                                 boolean state)
        For the specified fields, set the flag to a state if inclusive Else set all other fields in this Mbo to a state if exclusive This does not instanciate a MboValue so should be used whenever possible.
        Specified by:
        setFieldFlag in interface MboRemote
      • setFieldFlag

        public void setFieldFlag(java.lang.String[] names,
                                 boolean inclusive,
                                 long flag,
                                 boolean state,
                                 MXException mxe)
        For the specified fields, set the flag to a state if inclusive Else set all other fields in this Mbo to a state if exclusive This does not instanciate a MboValue so should be used whenever possible. Also set the MXException too.
        Specified by:
        setFieldFlag in interface MboRemote
      • checkFieldAccess

        public void checkFieldAccess(long accessModifier)
                              throws MXException
        Check field access for the entire object. This does not check a particular field, but just checks if the entire object of read only or not. Throws an MXAccessException if not allowed to access a field.
        Throws:
        MXException
      • hasFieldAccess

        public boolean hasFieldAccess(long accessModifier)
                               throws MXException
        Check field access for the entire object. This does not check a particular field, but just checks if the entire object of read only or not. Use this one over hasFieldAccess() if you don't reply on exceptions being thrown.
        Throws:
        MXException
      • enableMethod

        public void enableMethod(java.lang.String methodName,
                                 boolean state)
        Enable/disable a certain method name
      • checkMethodAccess

        public void checkMethodAccess(java.lang.String methodName,
                                      long accessModifier)
                               throws MXException,
                                      java.rmi.RemoteException
        Check if the method name is available. Will throw an MXAccessException if not available due to lack of rights, or if currently not available for this mbo. Programmers of mbos should override this method for implementation of specific secure methods. When overriding, always call the super class.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Profile.getUserStatus(), Mbo.sigopGranted(String)
      • checkMethodAccess

        public final void checkMethodAccess(java.lang.String methodName)
                                     throws MXException,
                                            java.rmi.RemoteException
        Check if the method name is available. Will throw an MXAccessException if not available due to lack of rights, or if currently not available for this mbo.
        Specified by:
        checkMethodAccess in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getUserName

        public java.lang.String getUserName()
                                     throws MXException,
                                            java.rmi.RemoteException
        Return user name logged into server
        Specified by:
        getUserName in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • fireEvent

        public void fireEvent(java.lang.String type)
                       throws MXException,
                              java.rmi.RemoteException
        fires events for the different types of events for all business objects The possible different types are - validate, preSaveEventAction, eventAction, postCommitEventAction
        Throws:
        MXException
        java.rmi.RemoteException
      • setRecordType

        protected void setRecordType()
                              throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
      • getRecordType

        protected java.lang.String getRecordType()
      • copy

        public MboRemote copy(MboSetRemote mboset)
                       throws MXException,
                              java.rmi.RemoteException
        Adds a new mbo to the set passed in and copies the information for each of the fields into the new mbo from this.
        Specified by:
        copy in interface MboRemote
        Parameters:
        mboset - The set into which the new mbo will be added.
        Returns:
        The new mbo, with values copied from this mbo.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.copy(MboSetRemote, long)
      • copy

        public MboRemote copy(MboSetRemote mboset,
                              long mboAddFlags)
                       throws MXException,
                              java.rmi.RemoteException
        Adds a new mbo to the set passed in and copies the information for each of the fields into the new mbo from this. The new mbo will be added to the next of the current index.
        Specified by:
        copy in interface MboRemote
        Parameters:
        mboset - The set into which the new mbo will be added.
        mboAddFlags - Flags to use when adding the new Mbo. Values on the attribute are always set with NOACCESSCHECK|NOVALIDATION_AND_NOACTION.
        Returns:
        The new mbo, with values copied from this mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyFake

        public MboRemote copyFake(MboSetRemote mboset)
                           throws MXException,
                                  java.rmi.RemoteException
        Adds a fake mbo to the set passed in and copies theinformation for each of the fields into the new mbo from this.
        Specified by:
        copyFake in interface MboRemote
        Parameters:
        mboset - The set into which the new mbo will be added.
        Returns:
        The new mbo, with values copied from this mbo.
        Throws:
        MXException
        java.rmi.RemoteException
      • setAutokeyFields

        public void setAutokeyFields()
                              throws MXException,
                                     java.rmi.RemoteException
        Methods to set the autokey to the autokey fields. This method is called when the autokey need to be reset based on the new site and org.
        Specified by:
        setAutokeyFields in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • blindCopy

        public MboRemote blindCopy(MboSetRemote mboset)
                            throws MXException,
                                   java.rmi.RemoteException
        Adds a new mbo to the set passed in and copies all the information for each of the fields into the new mbo. This is a straight copy as if to clone the object, it is used to manupulate the content of a MBO set in very special circumstances, and it is not intended to be used by application objects. The target mbo set needs to be set to NOSAVE almost in any occation.
        Specified by:
        blindCopy in interface MboRemote
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.blindCopy( MboSetRemote)
      • setCopyDefaults

        public void setCopyDefaults()
                             throws MXException,
                                    java.rmi.RemoteException
        Programmer should override this method a initialize any fields that are not copied correctly by the copy() method. Always call super.setCopyDefaults() when overriding.
        Specified by:
        setCopyDefaults in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getMXTransaction

        public MXTransaction getMXTransaction()
                                       throws java.rmi.RemoteException
        Return the MXTransaction that this Mbo participates in.
        Specified by:
        getMXTransaction in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • getRelatedWhere

        public java.lang.String getRelatedWhere()
                                         throws MXException,
                                                java.rmi.RemoteException
        Get the where clause for all the related objects that have had a Qbe set on them.
        Throws:
        MXException
        java.rmi.RemoteException
      • getRelatedWhere

        public java.lang.String getRelatedWhere(java.lang.String alias)
                                         throws MXException,
                                                java.rmi.RemoteException
        Get the where clause for all the related objects that have had a Qbe set on them.
        Throws:
        MXException
        java.rmi.RemoteException
      • hasRelatedQbe

        public boolean hasRelatedQbe()
                              throws MXException,
                                     java.rmi.RemoteException
        Do t he related MboSets have a Qbe ?
        Throws:
        MXException
        java.rmi.RemoteException
      • getIntegrationService

        public ServiceRemote getIntegrationService()
                                            throws java.rmi.RemoteException,
                                                   MXException
        Convenience Method for getting the IntegrationServiceRemote.
        Throws:
        java.rmi.RemoteException
        MXException
      • generateAutoKey

        public void generateAutoKey()
                             throws java.rmi.RemoteException,
                                    MXException
        This method has the mbo generate a unique identifier for itself. Most mbos do not support this and the default is to throw an access exception. Sub-classes supporting autokeying will override this default method.

        For example, an override often takes the following form (with the appropriate conditions and exception handling):

        getMboValue("pmnum").autoKey();
        or in other cases (no entry in autokey table), it could take the following:
        getMboValue("taglockid").generateUniqueID();
        Specified by:
        generateAutoKey in interface MboRemote
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        MboValue.autoKey(), MboValue.generateUniqueID()
      • getCheckpoint

        public boolean getCheckpoint()
      • unselect

        public void unselect()
                      throws MXException,
                             java.rmi.RemoteException
        Marks the mbo unselected
        Specified by:
        unselect in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • isSelected

        public boolean isSelected()
                           throws MXException,
                                  java.rmi.RemoteException
        Returns whether the mbo is marked for selection.
        Specified by:
        isSelected in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • copyValue

        public void copyValue(MboRemote sourceMbo,
                              java.lang.String attrSource,
                              java.lang.String attrTarget,
                              long flags)
                       throws MXException,
                              java.rmi.RemoteException
        This method will copy value of source attribute to target attribute
        1. If either of the attribute's are not translatable, this method will
        default to the setValue/getString
        2. If both attributes are translatable, then all language versions of
        source attr are copied to target attribute, except where the language
        versions where the value is null.
        Specified by:
        copyValue in interface MboRemote
        Parameters:
        sourceMbo - the Mbo to copy the values from. This Mbo maybe a member of another package.
        attrSource - the name of the attribute to copy
        attrTarget - the name of the attribute in this Mbo to copy the value to.
        flags - NOACCESSCHECK, NONE, NOVALIDATION_AND_NOACTION, etc..
        Throws:
        MXException
        java.rmi.RemoteException
      • copyValue

        public void copyValue(MboRemote sourceMbo,
                              java.lang.String[] attrSource,
                              java.lang.String[] attrTarget,
                              long flags)
                       throws MXException,
                              java.rmi.RemoteException
        This method will copy the given values of multiple source attributes to
        multiple target attributes.
        1. If either of the attribute's are not translatable, this method will
        default to the setValue/getString
        2. If both attributes are translatable, then all language versions of
        source attr are copied to target attribute, except where the language
        versions where the source value is null.
        Specified by:
        copyValue in interface MboRemote
        Parameters:
        sourceMbo - the Mbo to copy the values from. This Mbo maybe a member of another package.
        attrSource - the name of the attribute to copy
        attrTarget - the name of the attribute in this Mbo to copy the value to.
        flags - NOACCESSCHECK, NONE, NOVALIDATION_AND_NOACTION, etc..
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.copyValue(MboRemote sourceMbo, String attrSource, String attrTarget, long flags)
      • setPropagateKeyFlag

        public void setPropagateKeyFlag(boolean flag)
                                 throws MXException,
                                        java.rmi.RemoteException
        method for setting the propagate key flag
        Specified by:
        setPropagateKeyFlag in interface MboRemote
        Parameters:
        boolean - flag
        Throws:
        MXException
        java.rmi.RemoteException
      • setPropagateKeyFlag

        public void setPropagateKeyFlag(java.lang.String[] objectName,
                                        boolean flag)
                                 throws MXException,
                                        java.rmi.RemoteException
        methos to set objectnames to exclude from propagation
        Specified by:
        setPropagateKeyFlag in interface MboRemote
        Parameters:
        objectname - array
        flag - for true and false
        Throws:
        MXException
        java.rmi.RemoteException
      • excludeObjectForPropagate

        public boolean excludeObjectForPropagate(java.lang.String name)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Check if the object is exclude from propagation
        Specified by:
        excludeObjectForPropagate in interface MboRemote
        Parameters:
        object - name
        Returns:
        true or false
        Throws:
        MXException
        java.rmi.RemoteException
      • getPropagateKeyFlag

        public boolean getPropagateKeyFlag()
                                    throws MXException,
                                           java.rmi.RemoteException
        method for getting the propagate key flag
        Specified by:
        getPropagateKeyFlag in interface MboRemote
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
      • propagateKeyValue

        public void propagateKeyValue(java.lang.String keyName,
                                      java.lang.String keyValue)
                               throws MXException,
                                      java.rmi.RemoteException
        Method for propagating key value. Provide an implementation of the method only when the parent's key values need to be propagate down to this MBO which is a child of a MBO set obtained through a relationship from the parent, and only when the key attribute of the parent are not one of the key attributes of the child MBO. When overwrite this method, please don't call super().
        Specified by:
        propagateKeyValue in interface MboRemote
        Parameters:
        Key - name
        Key - Value
        Throws:
        MXException
        java.rmi.RemoteException
      • setHierarchyLink

        public void setHierarchyLink(boolean flag)
        method for setting the Hierarchy link
        Parameters:
        boolean - flag
      • hasHierarchyLink

        public boolean hasHierarchyLink()
                                 throws MXException,
                                        java.rmi.RemoteException
        method for getting if mbo has any hierarchy link or not
        Specified by:
        hasHierarchyLink in interface MboRemote
        Returns:
        boolean
        Throws:
        MXException
        java.rmi.RemoteException
      • setDefaultValue

        public void setDefaultValue()
        method for setting the default value for a mbo(screen default)
      • setDefaultValues

        public void setDefaultValues()
        method for setting the jsp field default values for a mbo
      • setAppDefaultValue

        public void setAppDefaultValue()
                                throws MXException,
                                       java.rmi.RemoteException
        method for setting the default app value for a mbo(appfielddefault table)
        Throws:
        MXException
        java.rmi.RemoteException
      • isBasedOn

        public boolean isBasedOn(java.lang.String objectName)
                          throws java.rmi.RemoteException
        Returns true, if this business object is based on the given business object name.
        Specified by:
        isBasedOn in interface MboRemote
        Returns:
        true, if this business object is based on the given object name, otherwise false.
        Throws:
        java.rmi.RemoteException
      • clear

        public void clear()
                   throws MXException,
                          java.rmi.RemoteException
        Clears out any references to other MBOs
        Specified by:
        clear in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getMboLogger

        public MXLogger getMboLogger()
        Returns a logger to log messages related to this business object.
        Returns:
        MXLogger a logger to log messages related to this business object.
      • getSecurityLogger

        public MXLogger getSecurityLogger()
        Returns a logger to log security messages related to this business object.
        Returns:
        MXLogger a logger to log messages related to this business object.
      • getSqlLogger

        public MXLogger getSqlLogger()
        Returns a logger to log SQL messages related to this business object.
        Returns:
        MXLogger a logger to log messages related to this business object.
      • getOrgForGL

        public java.lang.String getOrgForGL(java.lang.String lookupAttr)
                                     throws MXException,
                                            java.rmi.RemoteException
        returns OrgId to be used for GL
        Specified by:
        getOrgForGL in interface MboRemote
        Parameters:
        attributeName -
        Returns:
        orgId
        Throws:
        MXException
        java.rmi.RemoteException
      • getSiteOrg

        public java.lang.String[] getSiteOrg()
                                      throws MXException,
                                             java.rmi.RemoteException
        Find the org and site ids of current record. This method is used to further narrow down the values in the domain. The first element of the string array returned is the site id value. The second element is the org id value. If the record is not site level, the site id will be "". If it is system level, the org id part will be "". If the value is not set yet on the record,"" will be returned too.
        Specified by:
        getSiteOrg in interface MboRemote
        Returns:
        The first element of the string array is the site id value. The second element is the org id value.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getOrgSite()
      • setValue

        public void setValue(java.lang.String targetAttrName,
                             MboRemote sourceMbo)
                      throws MXException,
                             java.rmi.RemoteException
        This method set the related fields of the current record to the values of the corresponding key field of the sourceMbo.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        sourceMbo - The Mbo whose key values will be crossed over to the current Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String, MboRemote)
      • setValue

        public void setValue(java.lang.String targetAttrName,
                             MboSetRemote sourceMboSet)
                      throws MXException,
                             java.rmi.RemoteException
        This method set the related fields of the current record to the values of the corresponding key field of the current Mbo of sourceMboSet.
        Specified by:
        setValue in interface MboRemote
        Parameters:
        sourceMboSet - The Mbo Set whose current Mbo's key values will be crossed over to the current Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.setValue(String, MboSetRemote)
      • setLangCodeDefault

        public final void setLangCodeDefault()
                                      throws MXException,
                                             java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getUniqueIDName

        public java.lang.String getUniqueIDName()
                                         throws java.rmi.RemoteException,
                                                MXException
        returns the unique ID name
        Specified by:
        getUniqueIDName in interface MboRemote
        Returns:
        unique id name
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.mbo.getUniqueIDName
      • getUniqueIDValue

        public long getUniqueIDValue()
                              throws java.rmi.RemoteException,
                                     MXException
        Gets the unique ID value
        Specified by:
        getUniqueIDValue in interface MboRemote
        Parameters:
        tableName -
        Returns:
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.mbo.getUniqueIDValue
      • setValueFromSequence

        public void setValueFromSequence(java.lang.String attributeName)
                                  throws MXException
        Sets the attribute value from maxsequence or native sequence (depending on platform).
        Parameters:
        attributeName - The name of the attribute to get the next sequence value.
        Throws:
        MXException
        See Also:
        psdi.mbo.MaxSequence#generateUniqueID
      • getDocLinksCount

        public int getDocLinksCount()
                             throws MXException,
                                    java.rmi.RemoteException
        This method recursively traverse the doclinks tree of an object, and count the total number of attached documents related to it. The total number of doclinks includes the documents attached to itself, its children (line records, e.g.) and its referrential records (e.g. job plan to workorder) and their children's.
        Specified by:
        getDocLinksCount in interface MboRemote
        Returns:
        The total number of attached documents for this mbo and all its children.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getDocLinksCount()
      • getLinesRelationship

        public java.lang.String getLinesRelationship()
                                              throws MXException,
                                                     java.rmi.RemoteException
        Specified by:
        getLinesRelationship in interface MboRemote
        Returns:
        The relationship name which gets the Mbo set of lines for this record. For example, PO's line relationship is "POLINE", which returns the set of POLINE of the PO.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getLinesRelationship()
      • getMessage

        public java.lang.String getMessage(java.lang.String errGrp,
                                           java.lang.String errKey)
                                    throws java.rmi.RemoteException
        Get the message in the language specified by this MboSet's userInfo for the error group and error key. If no such message is found, errGrp#errKey will be returned.
        Specified by:
        getMessage in interface MboRemote
        Parameters:
        errGrp -
        errKey -
        Returns:
        Throws:
        java.rmi.RemoteException
      • getMessage

        public java.lang.String getMessage(java.lang.String errGrp,
                                           java.lang.String errKey,
                                           java.lang.Object[] params)
                                    throws java.rmi.RemoteException
        Get the message for the error group, error key and the parameter in the language of this Mbo's userInfo.
        Specified by:
        getMessage in interface MboRemote
        Returns:
        Throws:
        java.rmi.RemoteException
        See Also:
        Mbo.getMessage(String errGrp, String errKey, Object[] params)
      • getMessage

        public java.lang.String getMessage(java.lang.String errGrp,
                                           java.lang.String errKey,
                                           java.lang.Object param)
                                    throws java.rmi.RemoteException
        Get the message for the error group, error key and the parameter in the language of this Mbo's userInfo.
        Specified by:
        getMessage in interface MboRemote
        Returns:
        Throws:
        java.rmi.RemoteException
        See Also:
        Mbo.getMessage(String errGrp, String errKey, Object param)
      • getMessage

        public java.lang.String getMessage(MXException ex)
                                    throws java.rmi.RemoteException
        Get the message of the exception in the language specified by this Mbo's userInfo. returned.
        Specified by:
        getMessage in interface MboRemote
        Parameters:
        errGrp -
        errKey -
        Returns:
        Throws:
        java.rmi.RemoteException
      • getMaxMessage

        public MaxMessage getMaxMessage(java.lang.String errGrp,
                                        java.lang.String errKey)
                                 throws MXException,
                                        java.rmi.RemoteException
        Get the MaxMessage object for the specified error group and errorkey.
        Specified by:
        getMaxMessage in interface MboRemote
        Parameters:
        errGrp -
        errKey -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getMatchingAttr

        public java.lang.String getMatchingAttr(java.lang.String sourceObjectName,
                                                java.lang.String attribute)
                                         throws MXException,
                                                java.rmi.RemoteException
        Get the attribute in the lookup table which matches the specified attribute of this MBO.
        Specified by:
        getMatchingAttr in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getMatchingAttr(String,String)
      • getStringInSpecificLocale

        public java.lang.String getStringInSpecificLocale(java.lang.String attribute,
                                                          java.util.Locale l,
                                                          java.util.TimeZone tz)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Get the string of the value in a specific locale and timezone. This method is used to fetch value from an aln type field which can actually store different maxtype values. The values stored in the aln fields need to be in a common locale that can be loaded and converted to different locale string.
        Specified by:
        getStringInSpecificLocale in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • getMatchingAttrs

        public java.lang.Object[] getMatchingAttrs(java.lang.String sourceName,
                                                   java.lang.String targetAttr)
                                            throws MXException,
                                                   java.rmi.RemoteException
        This method retieves the lookup attribute mapping from the lookup source table to the target table by looking at the MAXLOOKUPMAP table if the mapping is specified there. If the mapping is not in the database, it will use the primary key columns of the target table to figure out the mapping. If the mapping cannot be obtained, an exception will be thrown. This method is only called if setLookupKeyMapInOrder() is not invoked before the mapping is used. In the derived class, you can call setLookupKeyMapInOrder() and setNotNullAttrs() in the constructor or setDomain() method to provide the attribut mapping. You would only need to overwrite this class if the default behavior to lookup the mapping is different in the derived class. This method first checks if there are entries for this attribute registered in maxlookupmap table. If it is, the mapping defined by the table will be fetched. If the mapping doesn't exist in maxlookupmap table. The following algorithm is used to determine the mapping. The framework first gets all the primary column names of the source mbo and then checks whether fields with the same names exist in the target mbo. If they do exist and the lookup attribute is one of them, a match is considered found. But if all the attributes with the same name exist in the target mbo, but none of them is the lookup attribute, it means that there is another field, not the lookup attribute is wrongly matched. The framework then checks if there is only one field among the keys of the source table has the same same as column and object as the lookup attribute or it is the same as column of the lookup attribute. Only if there is, the match will be corrected to the lookup attribute. If there is only one unmatched attribute left and the lookup attribute is not among the matched ones, it will check if the unmatched and the lookup attribute has the same same as object and column or if the source key is the same as column of the lookup attribute. If so, a match is considered done. All other cases will throw exception.
        Specified by:
        getMatchingAttrs in interface MboRemote
        Parameters:
        sourceMbo - the Mbo which is selected by the lookup.
        targetAttrName - the attribute is being looked up or examined.
        Returns:
        an object array. Each element is an array containing the target attribute, matching source attribute, and a Boolean of whether the target attribute can be null when the value is set on the interested attribute.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getMatchingAttrs(String, String)
      • initFieldFlagsOnMbo

        public void initFieldFlagsOnMbo(java.lang.String attrName)
                                 throws MXException
        The logic of setting the readonly and required field flags to the mbo. Any setting of the field flags that require expensive operation, such as database query should be moved from init() to this method. However, those which don't require steps such as fetching Mbos can be left in init(). You can group the logic for a few attributes together if logic of deciding their flag is the same, or in other words, can be handled at once.
        Throws:
        MXException
      • needCallInitFieldFlag

        public boolean needCallInitFieldFlag(java.lang.String attrName)
        This method will be called everytime when a field flag is requested for this attribute after the initial calling to method initFieldFalg(String) on the MBO. By default this method always returns false, which means the initFieldFlag(String) will only be called at most once in order to set the field flag. This is consistent to the old behavior that the flag is set during init of the field or the MBO. The developer should overwrite this method if the default is not desirable for certain attribute. For example, the readonly flag will change based on another value of the field. This method can be overwritten such that it keeps track of the value of this second field, and compare it to the current value. If the value change, this method returns true. The framework then will invoke the initFieldFlag(String) again on this attribute. The method should return immediately if the attribute passed in doesn't require any setting of field flags.
        Parameters:
        attrName -
        Returns:
      • checkSiteOrgAccessForSave

        public void checkSiteOrgAccessForSave()
                                       throws MXException,
                                              java.rmi.RemoteException
        Checks for access to siteid or orgid, and for conditional sigoption for optionnames INSERT, DELETE, and/or SAVE. This checks only the top-level Mbo (where mySet.getApp() returns a value). It is called from saveTransaction.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MboSet.getApp(), Mbo.sigopGranted(String, String)
      • sigopGranted

        public boolean sigopGranted(java.lang.String optionname)
                             throws MXException,
                                    java.rmi.RemoteException
        Identify whether this sigoption has been granted, based on this app, this Mbo's siteid/orgid, and any conditions that may have been attached to the applicationauth record.

        A method for evaluating a set of optionnames is provided in sigopGranted.

        Specified by:
        sigopGranted in interface MboRemote
        Parameters:
        optionname - Option name
        Returns:
        True if granted, else False
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MboSet.getParentApp(), Mbo.sigopGranted(String, String)
      • sigopGranted

        protected boolean sigopGranted(java.lang.String app,
                                       java.lang.String optionname,
                                       java.lang.String mboSite,
                                       java.lang.String mboOrg)
                                throws MXException,
                                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • sigopGranted

        public java.util.HashMap sigopGranted(java.util.Set optionnames)
                                       throws MXException,
                                              java.rmi.RemoteException
        Identify whether sigoptions have been granted, based on this app, this Mbo's siteid/orgid, and any conditions that may have been attached to the applicationauth record.

        A method for evaluating a single optionnames is provided in sigopGranted.

        Specified by:
        sigopGranted in interface MboRemote
        Parameters:
        optionnames -
        Returns:
        HashMap where key = optionname, value = boolean (True if granted).
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MboSet.getParentApp(), Mbo.sigopGranted(String, String)
      • getCondition

        public MaxCondition getCondition(java.lang.String conditionNum)
                                  throws java.rmi.RemoteException
        Get the MaxCondition object by the condition id.
        Parameters:
        conditionNum -
        Returns:
        The MaxCondition object. From this object, one can get the condition type and the string value which is either the classname, or the condition object.
        Throws:
        java.rmi.RemoteException
      • evaluateCondition

        public boolean evaluateCondition(java.lang.String conditionNum,
                                         boolean logErrorOnly)
                                  throws MXException,
                                         java.rmi.RemoteException
        Evaluate to true or false the given single condition by the condition number. The cached value will be returned if no change has been made to the MBO.
        Parameters:
        condition - number
        logErrorOnly - when it is true, the error will be only logged without throwing exception
        Returns:
        evaluate result as true or false
        Throws:
        MXException
        java.rmi.RemoteException
      • evaluateCondition

        public boolean evaluateCondition(java.lang.String conditionNum)
                                  throws MXException,
                                         java.rmi.RemoteException
        Evaluate to true or false the given single condition by the condition number. The cached value will be returned if no change has been made to the MBO.
        Specified by:
        evaluateCondition in interface MboRemote
        Returns:
        evaluate result as true or false
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.evaluateCondition(String)
      • getAlwaysFlags

        public BitFlag getAlwaysFlags(java.lang.String attr)
        Returns the access flag that apply to the attribute of all the records in the set unconditionally.
      • getAttrRestrictions

        public DataRestrictionCache.RestrictionBundle getAttrRestrictions(int levelRequested,
                                                                          java.lang.String attr)
                                                                   throws MXException,
                                                                          java.rmi.RemoteException
        Returns an array list of the attribute restrictions of the requested restriction level that applies to the attribute.
        Parameters:
        levelRequested -
        attr -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getDomainIDs

        public java.lang.String[] getDomainIDs(java.lang.String attr)
                                        throws MXException,
                                               java.rmi.RemoteException
        Returns an array of all domain ids linked to the field.
        Specified by:
        getDomainIDs in interface MboRemote
        Parameters:
        attr -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mbo.Mbo#getDomainIDs()
      • addToDeleteForInsertList

        public void addToDeleteForInsertList(java.lang.String mboName)
                                      throws java.rmi.RemoteException
        Add name of child mbo to the DeleteForInsert list.
        Specified by:
        addToDeleteForInsertList in interface MboRemote
        Parameters:
        mboName -
        Throws:
        java.rmi.RemoteException
      • getDeleteForInsertList

        public java.util.Vector getDeleteForInsertList()
                                                throws java.rmi.RemoteException
        Returns the list of deleteForInsert mbo names.
        Specified by:
        getDeleteForInsertList in interface MboRemote
        Returns:
        Throws:
        java.rmi.RemoteException
      • getCommLogOwnerNameAndUniqueId

        public java.lang.Object[] getCommLogOwnerNameAndUniqueId()
                                                          throws MXException,
                                                                 java.rmi.RemoteException
        Retuns an object array of owner object name and uniqueid so that commlog can set in the commlog table. This method is added to see commlog entry in different app other than the owner object who creates commlog. Developers can override this method if needed.
        Specified by:
        getCommLogOwnerNameAndUniqueId in interface MboRemote
        Returns:
        0-ObjectName,1-UniqueId
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.getCommLogOwnerNameAndUniqueId()
      • isChangeByUserWhenSetFromLookup

        public boolean isChangeByUserWhenSetFromLookup(java.lang.String lookupAttrName,
                                                       java.lang.String attributeName)
        Indicate whether the changeed by user flag should be set to the attribute when it is set along with other key field when the lookup attribute is being set on this Mbo. By default, the foreign key field is set to change by user when the field is part of the key set from lookup record. Overwrite it if the default behavoir is not desirable. The lookup attribute will always be set as changed by user.
        Parameters:
        attributeName - the attribute that is not the lookup attribute.
        lookupAttrName - the attribute whose lookup is being called.
        Returns:
      • validateKeyUniqueness

        public void validateKeyUniqueness()
                                   throws MXException,
                                          java.rmi.RemoteException
        Check whether the combination of primary keys are unique. This is called right before the save of the object only if the object is new and there are nullable key attributes for this object.
        Throws:
        MXException
        java.rmi.RemoteException
      • generateContentUID

        public void generateContentUID()
                                throws MXException,
                                       java.rmi.RemoteException
        Provide the contentuid. If contentuid field doesn't exist for this object, or the contentui is already provided when this method is called, it will not do anything. The object who has its own logic of generating content uid should provide a value before this method is reached, normally in the appValidate() method.
        Throws:
        MXException
        java.rmi.RemoteException
      • getDomainFilterWhere

        public java.lang.String getDomainFilterWhere(java.lang.String filterKeyword)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Get the domain filter where based on the filter keyword which contains the attribute name. The domain associated with this attribute is the doamin used for retrieving the org site where.
        Parameters:
        filterKeyword -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • determineRequiredFieldsFromERM

        public java.util.List determineRequiredFieldsFromERM(java.util.Collection attributes,
                                                             int mboVectorIndex)
                                                      throws MXException,
                                                             java.rmi.RemoteException
        Using the passed in list of ERMAttributes, this method will obtain a complete list of required fields that need a value for this mbo. THIS IS A VERY EXPENSIVE METHOD and should only be called when attempting to save the record. It also checks the releated MboSets for each mbo that needs to be saved. This call will load all MboValue's and check the isRequired for every attribute epecified within the ERMEntity and it's related ERMEntities. For each required field without a value, a new ERMAttributeError will ba added to the passed in list.
        Returns:
        returns a List of ERMAttributeErrors for each required field that does not have a value within the mbo and the mbo's related sets.
        Throws:
        MXException - Throws the possible MXException that can be thrown when trying to get MboValue for attributes
        java.rmi.RemoteException - Throws the possible MXException that can be thrown when trying to get MboValue for attributes
      • findAllNullRequiredFields

        public java.util.List findAllNullRequiredFields(java.util.Collection attributes,
                                                        int mboIndex)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Returns a list of ERMAttributeError for each required attribute with a null value. This method will traverse all Mbos in memory and all related MboSets as defined by the ERMEntity. The process only checks the already in memory mbos and only if they are new or modified. The process checks the flags on the MboValue if MboValue is instantiated, and checks the always flag as well as the flag set on Mbo is the MboValue is not instantiated or its flag is not asked for yet. This may not return the most accrate information about the required flag because it is intended not to do the expensive evaluation. if it is required
        Parameters:
        attributes - The list of required attributes to perform the null check on
        mboIndex - The index of this mbo in the MboSet's mbo vector
        Returns:
        A list of ERMAttributeErrors of all required fiedls without a value in this Mbo and any related MboSets.
        Throws:
        MXException
        java.rmi.RemoteException
      • getExistingMboSet

        public MboSetRemote getExistingMboSet(java.lang.String relationship)
                                       throws java.rmi.RemoteException
        Get a related MboSet for the object using the named relationship only if the the MboSet already exists. If it doesn't then the method will return null. It will also return null if the Mbo (this) is a zombie.
        Specified by:
        getExistingMboSet in interface MboRemote
        Parameters:
        name - The relationship provided to retrieve a related mboSet.
        Returns:
        The returned related set specified through the relationship if the MboSet has aleready been instantiated. Othewrwise it will return null
        Throws:
        java.rmi.RemoteException
      • addMboSetForRequiredCheck

        public void addMboSetForRequiredCheck(MboSetRemote mboSet)
                                       throws java.rmi.RemoteException
        Adds the related MboSet to a list that will be used to check for required fields without a value when the top most mboset is saved. This list was added because FauxMboSets are not included in the list of related MboSets of Mbo.
        Specified by:
        addMboSetForRequiredCheck in interface MboRemote
        Throws:
        java.rmi.RemoteException
      • getMboList

        public java.util.List getMboList(java.lang.String mrp)
                                  throws MXException,
                                         java.rmi.RemoteException
        Specified by:
        getMboList in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • setApplicationError

        public void setApplicationError(java.lang.String attribute,
                                        ApplicationError appError)
                                 throws MXException,
                                        java.rmi.RemoteException
        This method will set the passed in ApplicationError on the MboValue associated this the passed in attribute. This method allows the Application Framework (UI) to associate an error with an attribute so that all UI components bound to that attribute will know of the error.
        Specified by:
        setApplicationError in interface MboRemote
        Parameters:
        attribute - The attribute whos MboValue will receive the ApplicationError
        appError - The ApplicationError to be set on the attribute's MboValue
        Throws:
        MXException, - RemoteException
        MXException
        java.rmi.RemoteException
      • setApplicationRequired

        public void setApplicationRequired(java.lang.String attribute,
                                           boolean required)
                                    throws MXException,
                                           java.rmi.RemoteException
        This method will set the application required boolen flag on the MboValue associated this the passed in attribute. This method allows the Application Framework (UI) to specifically know whether or no it set requiredness on the attribute
        Specified by:
        setApplicationRequired in interface MboRemote
        Parameters:
        attribute - The attribute whos MboValue will receive the ApplicationError
        required - whether the field is required or not
        Throws:
        java.rmi.RemoteException
        MXException
      • getSynonymValueWhere

        public static java.lang.String getSynonymValueWhere(java.lang.String filterKeyword)
                                                     throws MXException,
                                                            java.rmi.RemoteException
        Get a list of synonym values that can be used in the sql by the keyword.
        Parameters:
        mbo -
        filterKeyword -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getRowStamp

        public final java.lang.String getRowStamp()
                                           throws MXApplicationException
        Returns the string representation of the rowstamp. If the object is a view, the returned is a string of comma seperated numbers. The order is in the order of RowstampInfo for this object. On sqlserver, the rowstamp is not a number, instead a byte array. A string represent the byte array value will be used.
        Returns:
        Throws:
        MXApplicationException
      • setReferencedMbo

        public void setReferencedMbo(java.lang.String token,
                                     MboRemote refMbo)
                              throws MXException,
                                     java.rmi.RemoteException
        We need this methods to keep track of the Process like WorkflowInstance
        Specified by:
        setReferencedMbo in interface MboRemote
        Parameters:
        refMbo -
        Throws:
        MXException
        java.rmi.RemoteException
      • getLanguageRecordRowStamp

        public long[] getLanguageRecordRowStamp()
                                         throws MXException,
                                                java.rmi.RemoteException
        Get the array of language rowstamp values. Null is returned if there is no language mbos involved.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getUniqueLanguageIDRecord

        public long[] getUniqueLanguageIDRecord()
                                         throws MXException,
                                                java.rmi.RemoteException
        Get the array of the unique language table ID values. Null is returned if there is no language mbos involved. Defect 229642: SaaS Production Language Issue - Mixed language on screen.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • isLocked

        public boolean isLocked()
                         throws java.rmi.RemoteException,
                                MXException
        Specified by:
        isLocked in interface MboRemote
        Returns:
        boolean - true if the record is locked and false if not
        Throws:
        java.rmi.RemoteException
        MXException
      • isLocked

        public boolean isLocked(boolean cache)
                         throws java.rmi.RemoteException,
                                MXException
        Specified by:
        isLocked in interface MboRemote
        Returns:
        boolean - true if the record is locked and false if not after checking the cache
        Throws:
        java.rmi.RemoteException
        MXException
      • isLockedByMe

        public boolean isLockedByMe()
                             throws java.rmi.RemoteException,
                                    MXException
        Returns:
        boolean - true if the record is locked by this session and false if not
        Throws:
        java.rmi.RemoteException
        MXException
      • isMboLockedByMe

        public boolean isMboLockedByMe()
                                throws java.rmi.RemoteException,
                                       MXException
        Checks if the current MBO is locked by this Session. This is verified by checking the cache
        Specified by:
        isMboLockedByMe in interface MboRemote
        Throws:
        java.rmi.RemoteException
        MXException
      • lock

        public void lock(boolean lockNow)
                  throws MXException,
                         java.rmi.RemoteException
        Specified by:
        lock in interface MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
      • unlock

        public void unlock(boolean unlockNow)
                    throws java.rmi.RemoteException,
                           MXException
        Unlocks the current MBO if recordlocking is enabled by the system property
        Specified by:
        unlock in interface MboRemote
        Throws:
        java.rmi.RemoteException
        MXException
      • isAppLockEnabled

        protected boolean isAppLockEnabled(java.lang.String app)
                                    throws java.rmi.RemoteException,
                                           MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • setIgnoreRecordLockCheck

        public void setIgnoreRecordLockCheck(boolean ignoreRecordLock)
                                      throws java.rmi.RemoteException,
                                             MXException
        Set to ignore record lock check
        Specified by:
        setIgnoreRecordLockCheck in interface MboRemote
        Throws:
        java.rmi.RemoteException
        MXException
      • isOptionGranted

        public boolean isOptionGranted(java.lang.String app,
                                       java.lang.String option)
                                throws java.rmi.RemoteException,
                                       MXException
        Is the given option granted for the app
        Specified by:
        isOptionGranted in interface MboRemote
        Throws:
        java.rmi.RemoteException
        MXException
      • deleteDoclinks

        protected void deleteDoclinks()
                               throws java.rmi.RemoteException,
                                      MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • undeleteDoclinks

        protected void undeleteDoclinks()
                                 throws java.rmi.RemoteException,
                                        MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • isNoSql

        public boolean isNoSql()
      • setNoSql

        public void setNoSql(boolean noSql)
      • resolveNoSqlWhere

        public boolean resolveNoSqlWhere()
      • setResolveNoSqlWhere

        public void setResolveNoSqlWhere(boolean resolveNoSqlWhere)
      • getResourceName

        public java.lang.String getResourceName()
      • setResourceName

        public void setResourceName(java.lang.String resourceName)
      • getESId

        public java.lang.String getESId()
      • setESId

        public void setESId(java.lang.String esId)
      • setMboCtx

        public void setMboCtx(java.lang.String propName,
                              java.lang.Object o)
      • getMboCtx

        public java.lang.Object getMboCtx(java.lang.String propName)
      • removeCtx

        public java.lang.Object removeCtx(java.lang.String propName)