Package de.pisa.psa.rst.obj
Klasse PsaRstApiObjBas
java.lang.Object
de.pisa.psa.rst.obj.PsaRstApiObjBas
- Bekannte direkte Unterklassen:
PsaRstApiObj
REST API: base implementation of a data object
- Seit:
- 22.01.2024
- Autor:
- weiland
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic class
ISO date controller classstatic class
string mapper for loading the data -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final String
The place holder data to indicate that the default value for a field should be used -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
checkAccess
(de.pisa.psc.srv.dto.PscDto dto, int row) check if the session has read access on a recordget the event handlerprotected de.pisa.psc.srv.dto.PscFld
get the data object fieldget the ISO date controller classstatic Optional
<PsaRstApiMapFld.MapEntry> getMappedClassField
(List<PsaRstApiMapFld.MapEntry> field_mapping, String name) get the field mapping by search for a JSON fieldboolean
get if the maximum number of characters should be set to a fieldboolean
get if base fields should be skipped during the loading of databoolean
if base fields are skipped get if the id field should be skipped toovoid
loadData
(de.pisa.psc.srv.dto.PscDto dto, int row) fill the attributes with data from the data objectprotected void
loadDataComponents
(de.pisa.psc.srv.dto.PscDto dto, int row) load the data for all attributes with a PsaRstApiMapCom annotationprotected void
loadDataFields
(de.pisa.psc.srv.dto.PscDto dto, int row) load the data for all attributes with a PsaRstApiMapFld annotationprotected void
loadDataRelations
(de.pisa.psc.srv.dto.PscDto dto, int row) load the data for all attributes with a PsaRstApiMapRel annotationprotected DataMapping
get a new data mapping instanceprotected de.pisa.psc.srv.dto.PscDto
create a new data objectprotected PsaRstApiObjBas.StringMapper
newStringMapper
(de.pisa.psc.srv.glb.PscSsn ssn) get a new string mappervoid
setData
(de.pisa.psc.srv.dto.PscDto dto, int row) set the value of the attributes at the data objectvoid
setDataPostPut
(de.pisa.psc.srv.dto.PscDto dto, int row) Hook after the data has been set and putDat has been called on the data objectvoid
setEventHandler
(PsaRstApiEvtHdl event_handler) set the event handlervoid
setEventHandler
(PsaRstApiObjBas object) set the event handler to the same event handler of another objectvoid
setIsoDate
(PsaRstApiObjBas.IsoDate iso_date) set the ISO date controller classvoid
setSetMaxData
(boolean max) set if the maximum number of characters should be set to a fieldvoid
setSkipBaseFields
(boolean skip_base_fields) set if base fields should be skipped during the loading of datavoid
setSkipIdField
(boolean skip_id_field) if base fields are skipped set if the id field should be skipped tooprotected boolean
check if a class field should be skipped during loading the data
-
Felddetails
-
DEFAULT_DATA
The place holder data to indicate that the default value for a field should be used- Siehe auch:
-
-
Konstruktordetails
-
PsaRstApiObjBas
public PsaRstApiObjBas()Constructor
-
-
Methodendetails
-
setSkipBaseFields
public void setSkipBaseFields(boolean skip_base_fields) set if base fields should be skipped during the loading of data- Parameter:
skip_base_fields
- true to skip fields
-
getSkipBaseFields
public boolean getSkipBaseFields()get if base fields should be skipped during the loading of data- Gibt zurück:
- true to skip fields
-
setSkipIdField
public void setSkipIdField(boolean skip_id_field) if base fields are skipped set if the id field should be skipped too- Parameter:
skip_id_field
- true to skip field (default=true)
-
getSkipIdField
public boolean getSkipIdField()if base fields are skipped get if the id field should be skipped too- Gibt zurück:
- true to skip fields
-
setSetMaxData
public void setSetMaxData(boolean max) set if the maximum number of characters should be set to a field- Parameter:
max
- number of character
-
getSetMaxData
public boolean getSetMaxData()get if the maximum number of characters should be set to a field- Gibt zurück:
- number of character
-
setIsoDate
set the ISO date controller class- Parameter:
iso_date
- class
-
getIsoDate
get the ISO date controller class- Gibt zurück:
- class
-
setEventHandler
set the event handler- Parameter:
event_handler
- handler
-
setEventHandler
set the event handler to the same event handler of another object- Parameter:
object
- object to get the vent handler from
-
getEventHandler
get the event handler- Gibt zurück:
- handler
-
newDto
protected de.pisa.psc.srv.dto.PscDto newDto(de.pisa.psc.srv.glb.PscSsn ssn, String dsc) throws Exception create a new data object- Parameter:
ssn
- sessiondsc
- descriptor of the data object- Gibt zurück:
- data object
- Löst aus:
Exception
-
newStringMapper
protected PsaRstApiObjBas.StringMapper newStringMapper(de.pisa.psc.srv.glb.PscSsn ssn) throws Exception get a new string mapper- Parameter:
ssn
- session- Gibt zurück:
- mapper
- Löst aus:
Exception
-
getMappedClassField
public static Optional<PsaRstApiMapFld.MapEntry> getMappedClassField(List<PsaRstApiMapFld.MapEntry> field_mapping, String name) get the field mapping by search for a JSON field- Parameter:
field_mapping
- field mappingsname
- name of the JSON field to search- Gibt zurück:
- mapping
-
checkAccess
check if the session has read access on a record- Parameter:
dto
- dtorow
- row to check- Gibt zurück:
- true if record can be read
- Löst aus:
Exception
-
loadData
fill the attributes with data from the data object- Parameter:
dto
- data objectrow
- row- Löst aus:
Exception
-
loadDataFields
load the data for all attributes with a PsaRstApiMapFld annotation- Parameter:
dto
- data objectrow
- row- Löst aus:
Exception
-
loadDataComponents
load the data for all attributes with a PsaRstApiMapCom annotation- Parameter:
dto
- data objectrow
- row- Löst aus:
Exception
-
loadDataRelations
load the data for all attributes with a PsaRstApiMapRel annotation- Parameter:
dto
- data objectrow
- row- Löst aus:
Exception
-
setData
set the value of the attributes at the data object- Parameter:
dto
- data object to modifyrow
- row to modify- Löst aus:
Exception
-
newDataMapping
get a new data mapping instance- Gibt zurück:
- mapper
- Löst aus:
Exception
-
setDataPostPut
Hook after the data has been set and putDat has been called on the data object- Parameter:
dto
- data objectrow
- the row that was modified- Löst aus:
Exception
-
getField
protected de.pisa.psc.srv.dto.PscFld getField(de.pisa.psc.srv.dto.PscDto dto, String fld_dsc, String lng) throws de.pisa.psc.srv.glb.PscExc get the data object field- Parameter:
dto
- data objectfld_dsc
- field descriptorlng
- optional language identifier (e.g. GER or ENG)- Gibt zurück:
- field
- Löst aus:
de.pisa.psc.srv.glb.PscExc
-
skipField
check if a class field should be skipped during loading the data- Parameter:
field
- field to check- Gibt zurück:
- true if the field should be skipped
-