4A Server -
2.0
|
Static class which persists data to the database. More...
Static Public Member Functions | |
static boolean | persist (RequestInfo requestInfo) |
static void | setUriOfAnnotationsParams (Annotation annot) |
static void | updateAnnot (EntityManager em, Annotation annotation, RequestInfo requestInfo) throws RuntimeException |
static boolean | persistAUpdAnnot (RequestInfo requestInfo) |
Static Private Member Functions | |
static AnnotType | queryType (String uri, EntityManager em) throws RuntimeException |
static void | updateTypesInNested (Annotation annotation, EntityManager em) |
static Annotation | saveTmpIdRefAnnotations (Annotation annot, RequestInfo requestInfo, EntityManager em) throws RuntimeException |
static void | saveTmpIdRefAnnotationsSolveLinks (RequestInfo requestInfo, EntityManager em, ArrayList< Annotation > justSaved, ArrayList< Annotation > nowSaved, ArrayList< Annotation > nestedBeforeSave, ArrayList< Annotation > nestedAfterSave, HashMap< Annotation, ArrayList< BaseAttribute >> unSavedLinks) throws RuntimeException |
static Annotation | saveTmpIdRefAnnotations (Annotation annot, RequestInfo requestInfo, EntityManager em, ArrayList< Annotation > justSaved, ArrayList< Annotation > nowSaved, ArrayList< Annotation > nested4Links, ArrayList< Annotation > nested4LinksFromDB, HashMap< Annotation, ArrayList< BaseAttribute >> unSavedLinks) throws RuntimeException |
static void | addNewReferenceOnNestedAnnotation (Annotation saved, ArrayList< Annotation > nested4LinksFromDB) |
static void | updateTypes (Annotation annotation, EntityManager em, String logMsg) throws RuntimeException |
static void | updateTmpIdRefInAddedEditedASuggested (String tmpId, Annotation newLink, RequestInfo requestInfo) |
static void | updateTmpIdRefInNested (String tmpId, Annotation nestedAnn, Annotation newLink) |
Static class which persists data to the database.
Static class which persists data to the database
Definition at line 49 of file Persister.java.
|
staticprivate |
Add new reference on nested annotations recursively to list
saved | Annotation with nested |
nested4LinksFromDB | List of new references |
Definition at line 1032 of file Persister.java.
|
static |
Persist informations from request to the database (it persists derived and related informations too)
requestInfo | Informations about client request |
Definition at line 58 of file Persister.java.
|
static |
Persist informations about automatically updated annotations
requestInfo | Informations about client request |
Definition at line 717 of file Persister.java.
|
staticprivate |
Query database for type of annotation
uri | URI of type of annotation |
em | Entity manager |
RuntimeException | If type of annotation was not found, throws exception |
Definition at line 689 of file Persister.java.
|
staticprivate |
Recursively saves annotations in attributes of given annotation.
annot | Annotation for reference update |
requestInfo | Informations about client request |
em | current EntityManager |
RuntimeException |
Definition at line 830 of file Persister.java.
|
staticprivate |
Recursively saves annotations in attributes of given annotation.
annot | Annotation for reference update |
requestInfo | Informations about client request |
em | current EntityManager |
justSaved | List of just saved annotations (versions before saving) |
nowSaved | List of just saved annotations (really saved versions) |
nested4Links | temporary list for nested annotation links |
nested4LinksFromDB | temporary list for saved nested annotation links |
unSavedLinks | HashMap of arraylist of unsaved links for annotation |
RuntimeException |
Definition at line 978 of file Persister.java.
|
staticprivate |
Updates links in saved annotations
requestInfo | Informations about client request |
em | current EntityManager |
justSaved | List of just saved annotations (versions before saving) |
nowSaved | List of just saved annotations (really saved versions) |
nestedBeforeSave | List of just saved nested annotations (versions before saving) |
nestedAfterSave | List of just saved nested annotations (really saved versions) |
unSavedLinks | HashMap of arraylist of unsaved links for annotation |
RuntimeException |
Definition at line 874 of file Persister.java.
|
static |
Sets uri from value in annotation link parameters of given annotation, also recursively in nested annotations
annot | Given annotation |
Definition at line 499 of file Persister.java.
|
static |
Updates complete informations about annotation in database
em | Entity manager |
annotation | Updated annotation |
requestInfo | Informations about client request |
Definition at line 532 of file Persister.java.
|
staticprivate |
Updates LinkedAnnotationAttribute references after saving new Annotations to DB
tmpId | old tmpId link of Annotation |
newLink | new link of Annotation |
requestInfo | Informations about client request |
Definition at line 1102 of file Persister.java.
|
staticprivate |
Updates NestAnnotationAttribute references after saving new Annotations to DB
tmpId | old tmpId link of Annotation |
nestedAnn | Nested Annotation link |
newLink | new link of Annotation |
Definition at line 1178 of file Persister.java.
|
staticprivate |
Method updates types in Annotation
annotation | annotation for update |
em | current EntityManager |
logMsg | Message which should be used for logging. |
RuntimeException |
Definition at line 1051 of file Persister.java.
|
staticprivate |
Updates types in nested annotations (use types stored in DB)
annotation | Annotation, which attributes will be updated |
em | Entity manager |
Definition at line 782 of file Persister.java.