public class JournalCollectionDAO
extends java.lang.Object
JournalCollection
objects.Constructor and Description |
---|
JournalCollectionDAO() |
Modifier and Type | Method and Description |
---|---|
static void |
deleteCollection(java.lang.String anchor)
deletes all journal collections with a given anchor from the database.
|
static void |
deleteCollection(java.lang.String anchor,
int year)
deletes the journal collections with a given anchor and year from the database.
|
static JournalCollection |
getCollection(javax.persistence.EntityManager em,
java.lang.String anchor,
int year)
returns a specific journal collection for one year with a given anchor
|
static JournalCollection |
getCollection(java.lang.String anchor,
int year)
returns a specific journal collection for one year with a given anchor
|
static java.util.List<JournalCollection> |
getCollections()
returns all journal collections stored in the database.
|
static java.util.List<JournalCollection> |
getCollections(javax.persistence.EntityManager em)
returns all journal collections stored in the database.
|
static java.util.List<JournalCollection> |
getCollections(javax.persistence.EntityManager em,
int year)
returns a list of journal collections for one year
|
static java.util.List<JournalCollection> |
getCollections(javax.persistence.EntityManager em,
java.lang.String anchor)
returns a list of journal collections with a given anchor
|
static java.util.List<JournalCollection> |
getCollections(int year)
returns a list of journal collections for one year
|
static java.util.List<JournalCollection> |
getCollections(java.lang.String anchor)
returns a list of journal collections with a given anchor
|
static java.util.List<java.lang.String> |
listCollections()
lists the anchors of all journal collections stored in the database.
|
static java.util.List<java.lang.String> |
listCollections(javax.persistence.EntityManager em)
lists the anchors of all journal collections stored in the database.
|
static void |
persistCollection(JournalCollection collection)
persists the given journal collection to the database.
|
static void |
persistCollections(javax.persistence.EntityManager em,
java.util.List<JournalCollection> collections)
persists a list of journal collections to the database.
|
static void |
persistCollections(java.util.Hashtable<java.lang.String,JournalCollection> collections)
persists a set of journal collections to the database, stored in a
Hashtable with the anchors as keys |
static void |
persistCollections(java.util.List<JournalCollection> collections)
persists a list of journal collections to the database.
|
public static java.util.List<JournalCollection> getCollections(java.lang.String anchor)
anchor
- the anchor of the journal collectionspublic static java.util.List<JournalCollection> getCollections(javax.persistence.EntityManager em, java.lang.String anchor)
anchor
- the anchor of the journal collectionsem
- the entity manager for the databasepublic static JournalCollection getCollection(javax.persistence.EntityManager em, java.lang.String anchor, int year)
anchor
- the anchor of the journal collectionsyear
- the yearem
- the entity manager of the databasepublic static JournalCollection getCollection(java.lang.String anchor, int year)
anchor
- the anchor of the journal collectionsyear
- the yearpublic static java.util.List<java.lang.String> listCollections()
public static java.util.List<java.lang.String> listCollections(javax.persistence.EntityManager em)
em
- the entity manager of the databasepublic static java.util.List<JournalCollection> getCollections(int year)
year
- the yearpublic static java.util.List<JournalCollection> getCollections(javax.persistence.EntityManager em, int year)
year
- the yearem
- the entity manager of the databasepublic static java.util.List<JournalCollection> getCollections()
public static java.util.List<JournalCollection> getCollections(javax.persistence.EntityManager em)
em
- the entity manager of the databasepublic static void deleteCollection(java.lang.String anchor)
anchor
- the anchor of the journal collectionpublic static void deleteCollection(java.lang.String anchor, int year)
anchor
- the anchor of the journal collectionyear
- the year to be deletedpublic static void persistCollection(JournalCollection collection)
collection
- the journal collection to be persistedpublic static void persistCollections(java.util.List<JournalCollection> collections)
collections
- the list of journal collections to be persistedpublic static void persistCollections(javax.persistence.EntityManager em, java.util.List<JournalCollection> collections)
em
- the entity manager of the databasecollections
- the list of journal collections to be persistedpublic static void persistCollections(java.util.Hashtable<java.lang.String,JournalCollection> collections)
Hashtable
with the anchors as keyscollections
- the list of journal collections to be persisted