Package io.tesler.sqlbc.crudma
Class SqlCrudmaService
- java.lang.Object
-
- io.tesler.core.crudma.impl.AbstractCrudmaService
-
- io.tesler.sqlbc.crudma.SqlCrudmaService
-
- All Implemented Interfaces:
Crudma
@Service @Transactional public class SqlCrudmaService extends AbstractCrudmaService
-
-
Constructor Summary
Constructors Constructor Description SqlCrudmaService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
count(BusinessComponent bc)
Returns the number of matching entitiesSqlComponentObject
get(BusinessComponent bc)
Returns object based on a business componentResultPage<SqlComponentObject>
getAll(BusinessComponent bc)
Returns all matched objects based on a business componentSQLMetaDTO
getMeta(BusinessComponent bc)
Returns meta for entity based on a business componentMetaDTO
getMetaEmpty(BusinessComponent bc)
Returns empty meta for entity based on a business componentActionResultDTO
invokeAction(BusinessComponent bc, String actionName, Map<String,Object> data)
Invokes action with given name, add preactions, loads or updates entity if necessaryActionResultDTO
update(BusinessComponent bc, Map<String,Object> data)
Updates an entity based on a business component by map-
Methods inherited from class io.tesler.core.crudma.impl.AbstractCrudmaService
associate, buildMeta, buildMeta, create, delete, getMetaNew, getOnFieldUpdateMeta, preview
-
-
-
-
Method Detail
-
get
public SqlComponentObject get(BusinessComponent bc)
Description copied from interface:Crudma
Returns object based on a business component- Specified by:
get
in interfaceCrudma
- Overrides:
get
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
DataResponseDTO
information about entity, it's changed fields, errors
-
getAll
public ResultPage<SqlComponentObject> getAll(BusinessComponent bc)
Description copied from interface:Crudma
Returns all matched objects based on a business component- Specified by:
getAll
in interfaceCrudma
- Overrides:
getAll
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
ResultPage
class with list of objects
-
update
public ActionResultDTO update(BusinessComponent bc, Map<String,Object> data)
Description copied from interface:Crudma
Updates an entity based on a business component by map- Specified by:
update
in interfaceCrudma
- Overrides:
update
in classAbstractCrudmaService
- Parameters:
bc
- businessComponentdata
- information about entity- Returns:
ActionResultDTO
class with DataResponseDTO and postactions
-
getMeta
public SQLMetaDTO getMeta(BusinessComponent bc)
Description copied from interface:Crudma
Returns meta for entity based on a business component- Specified by:
getMeta
in interfaceCrudma
- Overrides:
getMeta
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
MetaDTO
class with meta DTO and postactions
-
getMetaEmpty
public MetaDTO getMetaEmpty(BusinessComponent bc)
Description copied from interface:Crudma
Returns empty meta for entity based on a business component- Specified by:
getMetaEmpty
in interfaceCrudma
- Overrides:
getMetaEmpty
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
MetaDTO
class with meta DTO and postactions
-
count
public long count(BusinessComponent bc)
Description copied from interface:Crudma
Returns the number of matching entities- Specified by:
count
in interfaceCrudma
- Overrides:
count
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
- count
-
invokeAction
public ActionResultDTO invokeAction(BusinessComponent bc, String actionName, Map<String,Object> data)
Description copied from interface:Crudma
Invokes action with given name, add preactions, loads or updates entity if necessary- Specified by:
invokeAction
in interfaceCrudma
- Overrides:
invokeAction
in classAbstractCrudmaService
- Parameters:
bc
- businessComponentactionName
- name of actiondata
- information about entity- Returns:
ActionResultDTO
class with DataResponseDTO and postactions
-
-