public class DataObjectDefinition extends Named
Constructor and Description |
---|
DataObjectDefinition(java.lang.String name,
java.lang.String label,
Module ownermodule)
Create a new Data Object Definition
|
DataObjectDefinition(java.lang.String name,
java.lang.String label,
Module ownermodule,
boolean forcehideobject)
Create a new Data Object Definition
|
Modifier and Type | Method and Description |
---|---|
void |
addActionOnObjectPage(DynamicActionDefinition actiontoadd)
Shortcut method performing the following
Adding action to the module
adding action on the unique identified property of the data object,
making it appear in the object page
This method will fail if a unique identified property has not been added at
the point it is used.
|
void |
addActionOnSearchPage(StaticActionDefinition actiontoadd)
adds a static action on the search page of the object
|
void |
addActionToBusinessAdminGroup(ActionDefinition action)
adds an action to the business admin group for the data object
|
void |
addActionToCreateNewGroup(ActionDefinition action)
adds an action to the create new action group for the data object
|
void |
addActionToDataAdminActionGroup(ActionDefinition action)
adds an action to the data admin group for the data object
|
void |
addActionToExecutiveReadGroup(ActionDefinition action)
adds an action to the executive read action group for the data object
|
void |
addActionToFullGroup(ActionDefinition action)
adds an action to the full group for the data object
|
void |
addActionToLookupActionGroup(ActionDefinition action)
adds an action to the lookup action group
|
void |
addActionToModifyGroup(ActionDefinition action)
adds an action to the modify action group for the data object
|
void |
addActionToReadActionGroup(ActionDefinition action)
adds an action to the read action group for the data object
|
void |
addActionToScheduleActionGroup(ActionDefinition action)
adds an action to the schedule action group for the data object
|
void |
addActionToSteerActionGroup(ActionDefinition action)
adds an action to the steer action group for the data object
|
void |
addField(Field field)
adds a field to the data object
|
void |
addFieldasSearchElement(Field field,
SearchWidgetDefinition searchwidget)
adds a field to the data object with a search widget (not activated, see
github issue #24)
|
void |
addLoaderAlias(java.lang.String alias,
java.lang.String fullpath)
adds a flat file loader alias
|
void |
addLoaderAlias(java.lang.String alias,
java.lang.String fullpath,
ChoiceValue[] onlyforvalue)
adds an alias in the loading file.
|
void |
addMultiFieldConstraint(MultiFieldConstraint thisconstraint)
adds a multi-field constraint to this data object
|
void |
addProperties(Property<?>... properties)
a convenience method to add several properties to the data object definition
|
void |
addProperty(Property<?> property)
adds a new property to the data object
|
void |
addPropertyAsLegacy(Property<?> property)
adds a new property to the data object, removing it from the GUI, but still
keeping the data accessible for a migrator
|
boolean |
equals(java.lang.Object obj) |
void |
finalizemodel()
as part of the application generation, will finalize the properties settings
|
void |
generateAutomaticPagesAndActions(Module module)
This method adds to the module automatically generated actions and pages.
Pages: show:displays the attributes and allows access to other actions edit: allows to update the attributes of the object Actions: prepare blank object create object show object update object |
void |
generateDefinitionToFile(SourceGenerator sg,
Module module)
generates the definition of the data object to file
|
void |
generateToFile(SourceGenerator sg,
Module module)
generates the source code of the data object to file
|
StaticActionDefinition |
getActionOnSeachPage(int index)
the action on search page at the given index
|
int |
getActionOnSearchPageNumber() |
DataObjectDefinition |
getAliasFilterOnParent() |
ActionGroup |
getBusinessAdminActionGroup()
get the business administration action group for this data object to grant
privileges to an authority for this action group
|
ChoiceCategory |
getCategoryForExtractor() |
ActionGroup |
getCreateNewActionGroup()
get the create new action group for this data object to grant privileges to
an authority for this action group
|
ActionGroup |
getDataAdminActionGroup()
get the data admin action group for this data object to grant privileges to
an authority for this action group
|
ActionGroup |
getExecutiveReadActionGroup()
get the executive read action group for this data object to grant privileges
to an authority for this action group
|
ObjectTab[] |
getExtraTabs()
Provides the list of additional object tabs in addition to the object details
tab.
|
java.lang.String |
getLabel() |
org.openlowcode.design.data.DataObjectDefinition.StandardActionGroup |
getLookupActionGroup()
get the lookup action group for this data object to grant privileges to an
authority for this action group
|
ActionGroup |
getModifyActionGroup()
get the modify action group for this data object to grant privileges to an
authority for this action group
|
Module |
getOwnermodule() |
LinkedToParent<?>[] |
getParents() |
java.lang.String |
getPostprocessingForMethod(DataAccessMethod method,
Property<?> originproperty)
generate the post-processing for method
|
java.lang.String |
getPostprocessingForMethodForMassive(DataAccessMethod method,
Property<?> originproperty)
generate the post-processing for massive method
|
java.lang.String |
getPreprocessingForMethod(DataAccessMethod method,
Property<?> originproperty)
generate the preprocessing for method
|
java.lang.String |
getPreprocessingForMethodForMassive(DataAccessMethod method,
Property<?> originproperty)
generate the preprocessing for massive data access method
|
Property<?> |
getPropertyAt(int index)
get the property at the given index
|
Property<?> |
getPropertyByName(java.lang.String name)
gets the property by name of property
|
int |
getPropertySize() |
ActionGroup |
getReadActionGroup()
get the read action group for this data object to grant privileges to an
authority for this action group
|
ActionGroup |
getScheduleActionGroup()
get the schedule action group for this data object to grant privileges to an
authority for this action group
|
DataObjectDefinitionSearchPagesAndActions |
getSearchPagesAndActions() |
ActionGroup |
getSteerActionGroup()
get the steer action group for this data object to grant privileges to an
authority for this action group
|
SubObject |
getSubObject() |
boolean |
hasAlias() |
boolean |
hasFileContent() |
boolean |
hasLifecycle() |
boolean |
hasNamed() |
boolean |
hasNumbered() |
boolean |
hasSchedule() |
boolean |
hasSimpleWorkflow() |
boolean |
hasTargetDate() |
boolean |
hasTimeslot() |
void |
hideSCurve()
Allows to hide the SCurve component in the start page of the object if it
does not make sense for the object.
|
boolean |
isAutoNumbered() |
boolean |
isFieldInObject(Field field)
checks if the following field belongs to the object
|
boolean |
IsIterated() |
boolean |
isLocated() |
boolean |
isManualNumbered() |
boolean |
isNonOptionalContextForCreation() |
boolean |
isSaveAsInCreateNewGroup() |
boolean |
isSCurveHidden() |
boolean |
isShowActionAutomaticallyGenerated() |
boolean |
isStoredobject() |
LinkedToParent<?> |
isSubObject() |
boolean |
isUniqueIdentified() |
boolean |
isVersioned() |
Field |
lookupFieldByName(java.lang.String name)
get the field by name
|
void |
setAliasConditionOnParent(DataObjectDefinition parent)
allows to add an alias with condition on parent
|
void |
setDisplayProfile(DisplayProfile displayprofile)
adds a display profile to this data object
|
void |
setExtractorConditionChoice(ChoiceCategory category) |
void |
setForcedRowHeightForTable(int rowheightinline)
forces all tables in the user interface that show this object to have a row
height as specified (number of lines of text shown per row)
|
void |
setPreferedSpreadSheetTabName(java.lang.String preferedspreadsheettabname)
if a prefered spreadsheet tab name is specified, the flat file loader will
try to open a spreadsheet file on the tab with the provided name, so that the
import works even if the file was closed with another tab displayed
|
boolean |
showSearchInMenu() |
changeName, cleanName, getName
public DataObjectDefinition(java.lang.String name, java.lang.String label, Module ownermodule, boolean forcehideobject)
name
- java name of the data object definition (less than 16
characters recommended)label
- default language plain label of the data object for
display in the user interfaceownermodule
- parent module of the data objectforcehideobject
- hide the object (does not generate a search page in
the module menupublic DataObjectDefinition(java.lang.String name, java.lang.String label, Module ownermodule)
name
- java name of the data object definition (less than 16
characters recommended)label
- default language plain label of the data object for
display in the user interfaceownermodule
- parent module of the data objectpublic void setPreferedSpreadSheetTabName(java.lang.String preferedspreadsheettabname)
preferedspreadsheettabname
- name of the prefered tab for data loadingpublic ChoiceCategory getCategoryForExtractor()
public void setExtractorConditionChoice(ChoiceCategory category)
category
- a valid choice category for the modulepublic void addLoaderAlias(java.lang.String alias, java.lang.String fullpath, ChoiceValue[] onlyforvalue)
alias
- alias to be used in loading and export filefullpath
- the full path, typically name of the field or property
and parametersonlyforvalue
- a list of selected options for the loading for which the
field is validpublic void setAliasConditionOnParent(DataObjectDefinition parent)
parent
- public void addLoaderAlias(java.lang.String alias, java.lang.String fullpath)
alias
- alias to be used in loading and export filefullpath
- the full path, typically name of the field or property and
parameterspublic DataObjectDefinitionSearchPagesAndActions getSearchPagesAndActions()
public org.openlowcode.design.data.DataObjectDefinition.StandardActionGroup getLookupActionGroup()
public void addActionToLookupActionGroup(ActionDefinition action)
action
- action to add to the lookup action grouppublic boolean hasAlias()
public void addActionToScheduleActionGroup(ActionDefinition action)
action
- action to add to the action grouppublic void addActionToSteerActionGroup(ActionDefinition action)
action
- action to add to the action grouppublic void addActionToReadActionGroup(ActionDefinition action)
action
- action to add to the action grouppublic void addActionToModifyGroup(ActionDefinition action)
action
- action to add to the action grouppublic void addActionToCreateNewGroup(ActionDefinition action)
action
- action to add to the action grouppublic void addActionToExecutiveReadGroup(ActionDefinition action)
action
- action to add to the action grouppublic void addActionToBusinessAdminGroup(ActionDefinition action)
action
- action to add to the action grouppublic void addActionToDataAdminActionGroup(ActionDefinition action)
action
- action to add to the action grouppublic void addActionToFullGroup(ActionDefinition action)
action
- action to add to the action grouppublic ActionGroup getDataAdminActionGroup()
public ActionGroup getReadActionGroup()
public ActionGroup getModifyActionGroup()
public ActionGroup getSteerActionGroup()
public ActionGroup getCreateNewActionGroup()
public ActionGroup getScheduleActionGroup()
public ActionGroup getBusinessAdminActionGroup()
public ActionGroup getExecutiveReadActionGroup()
public java.lang.String getLabel()
public void setForcedRowHeightForTable(int rowheightinline)
rowheightinline
- number of lines of text shown per rowpublic void hideSCurve()
public boolean isSCurveHidden()
public DataObjectDefinition getAliasFilterOnParent()
public Field lookupFieldByName(java.lang.String name)
name
- name of the field (java name)public Module getOwnermodule()
public void setDisplayProfile(DisplayProfile displayprofile)
displayprofile
- display profile to addpublic int getPropertySize()
public Property<?> getPropertyAt(int index)
index
- a number between 0 (included) and getPropertySize (excluded)public boolean isFieldInObject(Field field)
field
- fieldpublic ObjectTab[] getExtraTabs()
public boolean hasTargetDate()
public LinkedToParent<?> isSubObject()
public SubObject getSubObject()
public boolean showSearchInMenu()
public void addMultiFieldConstraint(MultiFieldConstraint thisconstraint)
thisconstraint
- constraint to addpublic void addActionOnObjectPage(DynamicActionDefinition actiontoadd)
actiontoadd
- a dynamic action with as single entry argument the object
id of the Data Object.public void addActionOnSearchPage(StaticActionDefinition actiontoadd)
actiontoadd
- action to addpublic int getActionOnSearchPageNumber()
public StaticActionDefinition getActionOnSeachPage(int index)
index
- a number between 0 (included) and getActionOnSearchPageNumber
(excluded)public void addField(Field field)
field
- field to addpublic void addFieldasSearchElement(Field field, SearchWidgetDefinition searchwidget)
field
- field to addsearchwidget
- search widget to addpublic void addProperties(Property<?>... properties)
properties
- propertiespublic void addProperty(Property<?> property)
property
- property to addpublic void addPropertyAsLegacy(Property<?> property)
property
- property to addpublic Property<?> getPropertyByName(java.lang.String name)
name
- java name of the propertypublic void generateAutomaticPagesAndActions(Module module)
module
- current module of the objectpublic boolean isShowActionAutomaticallyGenerated()
public boolean isLocated()
public boolean hasLifecycle()
public boolean hasTimeslot()
public boolean hasSchedule()
public boolean hasNumbered()
public boolean isVersioned()
public boolean hasNamed()
public boolean isManualNumbered()
public boolean isAutoNumbered()
public boolean isStoredobject()
public boolean isSaveAsInCreateNewGroup()
public boolean IsIterated()
public boolean hasSimpleWorkflow()
public boolean hasFileContent()
public boolean isUniqueIdentified()
public LinkedToParent<?>[] getParents()
public java.lang.String getPreprocessingForMethodForMassive(DataAccessMethod method, Property<?> originproperty)
method
- data access methodoriginproperty
- property linked to the data access methodpublic java.lang.String getPreprocessingForMethod(DataAccessMethod method, Property<?> originproperty)
method
- data access methodoriginproperty
- property linked to the data access methodpublic java.lang.String getPostprocessingForMethod(DataAccessMethod method, Property<?> originproperty)
method
- data access methodoriginproperty
- property linked to the data access methodpublic java.lang.String getPostprocessingForMethodForMassive(DataAccessMethod method, Property<?> originproperty)
method
- data access methodoriginproperty
- property linked to the data access methodpublic boolean isNonOptionalContextForCreation()
public void finalizemodel()
public void generateDefinitionToFile(SourceGenerator sg, Module module) throws java.io.IOException
sg
- source generatormodule
- parent modulejava.io.IOException
- if anything bad happens during code generationpublic void generateToFile(SourceGenerator sg, Module module) throws java.io.IOException
sg
- source generatormodule
- parent modulejava.io.IOException
- if anything bad happens during code generation