org.broadleafcommerce.openadmin.client.datasource.dynamic.module
Class BasicClientEntityModule
java.lang.Object
org.broadleafcommerce.openadmin.client.datasource.dynamic.module.BasicClientEntityModule
- All Implemented Interfaces:
- DataSourceModule
- Direct Known Subclasses:
- AdornedTargetListClientModule, MapStructureClientModule
public class BasicClientEntityModule
- extends Object
- implements DataSourceModule
- Author:
- jfischer
|
Method Summary |
protected void |
buildCriteria(com.google.gwt.json.client.JSONArray criteriaArray,
CriteriaTransferObject cto)
|
Entity |
buildEntity(com.smartgwt.client.data.Record record,
com.smartgwt.client.data.DSRequest request)
|
void |
buildFields(String[] customCriteria,
Boolean overrideFieldSort,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
|
com.smartgwt.client.data.Record |
buildRecord(Entity entity,
Boolean updateId)
|
com.smartgwt.client.widgets.tree.TreeNode[] |
buildRecords(DynamicResultSet result,
String[] filterOutIds)
|
void |
executeAdd(String requestId,
com.smartgwt.client.data.DSRequest request,
com.smartgwt.client.data.DSResponse response,
String[] customCriteria,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
|
void |
executeFetch(String requestId,
com.smartgwt.client.data.DSRequest request,
com.smartgwt.client.data.DSResponse response,
String[] customCriteria,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
|
void |
executeRemove(String requestId,
com.smartgwt.client.data.DSRequest request,
com.smartgwt.client.data.DSResponse response,
String[] customCriteria,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
|
void |
executeUpdate(String requestId,
com.smartgwt.client.data.DSRequest request,
com.smartgwt.client.data.DSResponse response,
String[] customCriteria,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
|
protected void |
filterProperties(ClassMetadata metadata,
MergedPropertyType[] includeTypes,
Boolean overrideFieldSort,
PresenterSequenceSetupManager presenterSequenceSetupManager)
|
String |
getCeilingEntityFullyQualifiedClassname()
|
CriteriaTransferObject |
getCto(com.smartgwt.client.data.DSRequest request)
Transforms the given request into
CriteriaTransferObject instance. |
ForeignKey |
getCurrentForeignKey()
|
String |
getLinkedValue()
|
String |
getLocalizedString(String value)
Looks up the given value as a key via the MessageManager. |
boolean |
isCompatible(OperationType operationType)
|
protected void |
processFilterValueClause(FilterAndSortCriteria filterCriteria,
String filterString)
|
void |
setCurrentForeignKey(ForeignKey currentForeignKey)
|
void |
setDataSource(AbstractDynamicDataSource dataSource)
|
void |
setLinkedValue(String linkedValue)
|
protected String |
updateMinutesFromDateFilter(String originalDateString,
int position)
|
com.smartgwt.client.data.Record |
updateRecord(Entity entity,
com.smartgwt.client.data.Record record,
Boolean updateId)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
formatter
protected final com.google.gwt.i18n.client.DateTimeFormat formatter
currentForeignKey
protected ForeignKey currentForeignKey
dataSource
protected AbstractDynamicDataSource dataSource
linkedValue
protected String linkedValue
service
protected DynamicEntityServiceAsync service
ceilingEntityFullyQualifiedClassname
protected final String ceilingEntityFullyQualifiedClassname
fetchTypeFullyQualifiedClassname
protected final String fetchTypeFullyQualifiedClassname
persistencePerspective
protected PersistencePerspective persistencePerspective
loadLevelCount
protected Long loadLevelCount
BasicClientEntityModule
public BasicClientEntityModule(String ceilingEntityFullyQualifiedClassname,
PersistencePerspective persistencePerspective,
DynamicEntityServiceAsync service)
BasicClientEntityModule
public BasicClientEntityModule(String ceilingEntityFullyQualifiedClassname,
String fetchTypeFullyQualifiedClassname,
PersistencePerspective persistencePerspective,
DynamicEntityServiceAsync service)
getCto
public CriteriaTransferObject getCto(com.smartgwt.client.data.DSRequest request)
- Transforms the given request into
CriteriaTransferObject instance.
We are doing this because we can apply seamless
CTO-to-criteria conversions back on the server.
- Specified by:
getCto in interface DataSourceModule
processFilterValueClause
protected void processFilterValueClause(FilterAndSortCriteria filterCriteria,
String filterString)
getCurrentForeignKey
public ForeignKey getCurrentForeignKey()
setCurrentForeignKey
public void setCurrentForeignKey(ForeignKey currentForeignKey)
getLinkedValue
public String getLinkedValue()
- Specified by:
getLinkedValue in interface DataSourceModule
setLinkedValue
public void setLinkedValue(String linkedValue)
- Specified by:
setLinkedValue in interface DataSourceModule
buildCriteria
protected void buildCriteria(com.google.gwt.json.client.JSONArray criteriaArray,
CriteriaTransferObject cto)
updateMinutesFromDateFilter
protected String updateMinutesFromDateFilter(String originalDateString,
int position)
isCompatible
public boolean isCompatible(OperationType operationType)
- Specified by:
isCompatible in interface DataSourceModule
executeFetch
public void executeFetch(String requestId,
com.smartgwt.client.data.DSRequest request,
com.smartgwt.client.data.DSResponse response,
String[] customCriteria,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
- Specified by:
executeFetch in interface DataSourceModule
executeAdd
public void executeAdd(String requestId,
com.smartgwt.client.data.DSRequest request,
com.smartgwt.client.data.DSResponse response,
String[] customCriteria,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
- Specified by:
executeAdd in interface DataSourceModule
executeUpdate
public void executeUpdate(String requestId,
com.smartgwt.client.data.DSRequest request,
com.smartgwt.client.data.DSResponse response,
String[] customCriteria,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
- Specified by:
executeUpdate in interface DataSourceModule
executeRemove
public void executeRemove(String requestId,
com.smartgwt.client.data.DSRequest request,
com.smartgwt.client.data.DSResponse response,
String[] customCriteria,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
- Specified by:
executeRemove in interface DataSourceModule
buildRecord
public com.smartgwt.client.data.Record buildRecord(Entity entity,
Boolean updateId)
- Specified by:
buildRecord in interface DataSourceModule
updateRecord
public com.smartgwt.client.data.Record updateRecord(Entity entity,
com.smartgwt.client.data.Record record,
Boolean updateId)
- Specified by:
updateRecord in interface DataSourceModule
buildRecords
public com.smartgwt.client.widgets.tree.TreeNode[] buildRecords(DynamicResultSet result,
String[] filterOutIds)
- Specified by:
buildRecords in interface DataSourceModule
buildEntity
public Entity buildEntity(com.smartgwt.client.data.Record record,
com.smartgwt.client.data.DSRequest request)
- Specified by:
buildEntity in interface DataSourceModule
buildFields
public void buildFields(String[] customCriteria,
Boolean overrideFieldSort,
com.google.gwt.user.client.rpc.AsyncCallback<com.smartgwt.client.data.DataSource> cb)
- Specified by:
buildFields in interface DataSourceModule
filterProperties
protected void filterProperties(ClassMetadata metadata,
MergedPropertyType[] includeTypes,
Boolean overrideFieldSort,
PresenterSequenceSetupManager presenterSequenceSetupManager)
throws IllegalStateException
- Throws:
IllegalStateException
getLocalizedString
public String getLocalizedString(String value)
- Looks up the given value as a key via the MessageManager. If it's not
found, return the original value passed in
- Returns:
- the message for the key specified by value if it exists
or value if it does not
setDataSource
public void setDataSource(AbstractDynamicDataSource dataSource)
- Specified by:
setDataSource in interface DataSourceModule
getCeilingEntityFullyQualifiedClassname
public String getCeilingEntityFullyQualifiedClassname()
- Specified by:
getCeilingEntityFullyQualifiedClassname in interface DataSourceModule
Copyright © 2013. All Rights Reserved.