public class BusinessObjectTool
extends java.lang.Object
Helper class to manipulate business objects in specific code
Modifier and Type | Class and Description |
---|---|
class |
BusinessObjectTool.ReturnMessage |
Constructor and Description |
---|
BusinessObjectTool(Grant grant,
java.lang.String objectName,
java.lang.String objectIntanceName)
Constructor
|
BusinessObjectTool(ObjectDB object)
Constructor
|
Modifier and Type | Method and Description |
---|---|
BusinessObjectTool.ReturnMessage |
create()
Helper method to process create save throwing exception in case of error
Forces row ID at objectField.DEFAULT_ROW_ID and calls save. |
BusinessObjectTool.ReturnMessage |
del()
Alias to delete (naming suitable for script usage)
|
BusinessObjectTool.ReturnMessage |
delete()
Helper method to process deletion throwing exception in case of error
|
void |
get(java.lang.String rowId)
Helper method to process row selection throwing exception in case of error
|
void |
getForCopy(java.lang.String rowId)
Helper method to process row selection for copy throwing exception in case of error
|
void |
getForCreate()
Helper method to process row initialization for create throwing exception in case of error.
|
void |
getForDelete(java.lang.String rowId)
Helper method to process row selection for delete throwing exception in case of error
|
void |
getForUpdate(java.lang.String rowId)
Helper method to process row selection for update throwing exception in case of error
|
ObjectDB |
getObject() |
void |
log(java.lang.String method,
com.simplicite.util.exceptions.GenericException e)
Helper method to handle an Exception as a log entry (for code EXCEPTION)
|
BusinessObjectTool.ReturnMessage |
save()
Helper method to process save (create or update) throwing appropriate exception in case of error
|
java.util.List<java.lang.String[]> |
search()
Helper method to process search throwing exception in case of error
|
void |
select(java.lang.String rowId)
Alias of get.
|
void |
selectForCopy(java.lang.String rowId)
Alias of getForCopy.
|
void |
selectForCreate()
Alias of getForCreate.
|
void |
selectForDelete(java.lang.String rowId)
Alias to getForDelete.
|
void |
selectForUpdate(java.lang.String rowId)
Alias to getForUpdate.
|
BusinessObjectTool.ReturnMessage |
update()
Helper method to process update save throwing exception in case of error
|
java.util.List<BusinessObjectTool.ReturnMessage> |
validate()
Helper method to process validation throwing exception in case of error(s)
|
java.util.List<BusinessObjectTool.ReturnMessage> |
validateAndCreate()
Helper method to process validation and create save throwing appropriate exception in case of error(s).
Forces row ID at objectField.DEFAULT_ROW_ID and calls validateAndSave. |
java.util.List<BusinessObjectTool.ReturnMessage> |
validateAndSave()
Helper method to process validation and save (create or update) throwing appropriate exception in case of error(s)
|
java.util.List<java.lang.String[]> |
validateAndSearch()
Helper method to process search validation and search throwing exception in case of error
|
java.util.List<BusinessObjectTool.ReturnMessage> |
validateAndUpdate()
Helper method to process validation and update save throwing appropriate exception in case of error(s)
|
public BusinessObjectTool(ObjectDB object)
Constructor
object
- Business objectpublic BusinessObjectTool(Grant grant, java.lang.String objectName, java.lang.String objectIntanceName)
Constructor
grant
- GrantobjectName
- Object nameobjectIntanceName
- Object instance namepublic ObjectDB getObject()
public void get(java.lang.String rowId) throws com.simplicite.util.exceptions.GetException
Helper method to process row selection throwing exception in case of error
rowId
- Row ID of row to getcom.simplicite.util.exceptions.GetException
public void select(java.lang.String rowId) throws com.simplicite.util.exceptions.GetException
Alias of get.
rowId
- Row ID of row to getcom.simplicite.util.exceptions.GetException
public void getForCreate() throws com.simplicite.util.exceptions.GetException
Helper method to process row initialization for create throwing exception in case of error.
com.simplicite.util.exceptions.GetException
public void selectForCreate() throws com.simplicite.util.exceptions.GetException
Alias of getForCreate.
com.simplicite.util.exceptions.GetException
public void getForCopy(java.lang.String rowId) throws com.simplicite.util.exceptions.GetException
Helper method to process row selection for copy throwing exception in case of error
rowId
- Row ID of row to copy fromcom.simplicite.util.exceptions.GetException
public void selectForCopy(java.lang.String rowId) throws com.simplicite.util.exceptions.GetException
Alias of getForCopy.
rowId
- Row ID of row to copy fromcom.simplicite.util.exceptions.GetException
public void getForUpdate(java.lang.String rowId) throws com.simplicite.util.exceptions.GetException
Helper method to process row selection for update throwing exception in case of error
rowId
- Row ID of row to getcom.simplicite.util.exceptions.GetException
public void selectForUpdate(java.lang.String rowId) throws com.simplicite.util.exceptions.GetException
Alias to getForUpdate.
rowId
- Row ID of row to getcom.simplicite.util.exceptions.GetException
public void getForDelete(java.lang.String rowId) throws com.simplicite.util.exceptions.GetException
Helper method to process row selection for delete throwing exception in case of error
rowId
- Row ID of row to getcom.simplicite.util.exceptions.GetException
public void selectForDelete(java.lang.String rowId) throws com.simplicite.util.exceptions.GetException
Alias to getForDelete.
rowId
- Row ID of row to getcom.simplicite.util.exceptions.GetException
public java.util.List<java.lang.String[]> validateAndSearch() throws com.simplicite.util.exceptions.ValidateSearchException, com.simplicite.util.exceptions.SearchException
Helper method to process search validation and search throwing exception in case of error
com.simplicite.util.exceptions.ValidateSearchException
com.simplicite.util.exceptions.SearchException
public java.util.List<java.lang.String[]> search() throws com.simplicite.util.exceptions.SearchException
Helper method to process search throwing exception in case of error
com.simplicite.util.exceptions.SearchException
public java.util.List<BusinessObjectTool.ReturnMessage> validate() throws com.simplicite.util.exceptions.ValidateException
Helper method to process validation throwing exception in case of error(s)
com.simplicite.util.exceptions.ValidateException
public BusinessObjectTool.ReturnMessage save() throws com.simplicite.util.exceptions.SaveException
Helper method to process save (create or update) throwing appropriate exception in case of error
com.simplicite.util.exceptions.SaveException
public BusinessObjectTool.ReturnMessage create() throws com.simplicite.util.exceptions.CreateException
Helper method to process create save throwing exception in case of error
Forces row ID at objectField.DEFAULT_ROW_ID and calls save.
com.simplicite.util.exceptions.CreateException
public BusinessObjectTool.ReturnMessage update() throws com.simplicite.util.exceptions.UpdateException
Helper method to process update save throwing exception in case of error
com.simplicite.util.exceptions.UpdateException
public java.util.List<BusinessObjectTool.ReturnMessage> validateAndSave() throws com.simplicite.util.exceptions.ValidateException, com.simplicite.util.exceptions.SaveException
Helper method to process validation and save (create or update) throwing appropriate exception in case of error(s)
com.simplicite.util.exceptions.ValidateException
com.simplicite.util.exceptions.SaveException
public java.util.List<BusinessObjectTool.ReturnMessage> validateAndCreate() throws com.simplicite.util.exceptions.ValidateException, com.simplicite.util.exceptions.CreateException
Helper method to process validation and create save throwing appropriate exception in case of error(s).
Forces row ID at objectField.DEFAULT_ROW_ID and calls validateAndSave.
com.simplicite.util.exceptions.ValidateException
com.simplicite.util.exceptions.CreateException
public java.util.List<BusinessObjectTool.ReturnMessage> validateAndUpdate() throws com.simplicite.util.exceptions.ValidateException, com.simplicite.util.exceptions.UpdateException
Helper method to process validation and update save throwing appropriate exception in case of error(s)
com.simplicite.util.exceptions.ValidateException
com.simplicite.util.exceptions.UpdateException
public BusinessObjectTool.ReturnMessage delete() throws com.simplicite.util.exceptions.DeleteException
Helper method to process deletion throwing exception in case of error
com.simplicite.util.exceptions.DeleteException
public final BusinessObjectTool.ReturnMessage del() throws com.simplicite.util.exceptions.DeleteException
Alias to delete (naming suitable for script usage)
com.simplicite.util.exceptions.DeleteException
public void log(java.lang.String method, com.simplicite.util.exceptions.GenericException e)
Helper method to handle an Exception as a log entry (for code EXCEPTION)
method
- Methode
- ExceptionCopyright (c)2006-2015 Simplicite Software. All Rights Reserved.