Permalink
Browse files

All methods that return a container now return a Collection instead o…

…f any of its sub-classes.
  • Loading branch information...
1 parent b90e93a commit 28019f0d64e0c10604370392334f2b5348ddcbfc @ccorsi committed Sep 4, 2010
@@ -23,12 +23,12 @@
*/
package books.persistence.types.orientdb;
+import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import com.orientechnologies.orient.core.record.ORecord;
import com.orientechnologies.orient.core.record.impl.ODocument;
@@ -55,7 +55,7 @@
private static final String COPYRIGHT = "copyright";
private static final String TITLE = "title";
- static final String DATEREAD = "date-read";
+ public static final String DATEREAD = "date-read";
private static final String PAGES = "pages";
private static final String SERIES = "series";
private static final String GENDERS = "genders";
@@ -99,7 +99,7 @@ public Date getDateFinishReading() {
* @see books.persistence.Book#getGenders()
*/
@Override
- public List<Gender> getGenders() {
+ public Collection<Gender> getGenders() {
List<ORecord<Object>> gendersDoc = Util.getValue(doc, GENDERS);
List<Gender> genders = new LinkedList<Gender>();
if (gendersDoc != null) {
@@ -129,7 +129,7 @@ public int getPages() {
* @see books.persistence.Book#getPerson(books.persistence.PersonType)
*/
@Override
- public List<Person> getPersons(PersonType type) {
+ public Collection<Person> getPersons(PersonType type) {
List<ORecord<Object>> personsDoc = Util.getValue(doc, BookOrientDB.personTypeNames.get(type));
List<Person> persons = new LinkedList<Person>();
if (personsDoc != null) {
@@ -157,7 +157,7 @@ public String getSeries() {
* @see books.persistence.Book#getSubTitles()
*/
@Override
- public Set<String> getSubTitles() {
+ public Collection<String> getSubTitles() {
return Util.getValue(doc, SUBTITLES);
}

0 comments on commit 28019f0

Please sign in to comment.