diff options
Diffstat (limited to 'src/uk/org/ury/library/item')
-rw-r--r-- | src/uk/org/ury/library/item/LibraryItem.java | 26 | ||||
-rw-r--r-- | src/uk/org/ury/library/item/LibraryItemProperty.java | 62 |
2 files changed, 0 insertions, 88 deletions
diff --git a/src/uk/org/ury/library/item/LibraryItem.java b/src/uk/org/ury/library/item/LibraryItem.java deleted file mode 100644 index d2a790b..0000000 --- a/src/uk/org/ury/library/item/LibraryItem.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * - */ -package uk.org.ury.library.item; - - -import java.util.Map; - -import uk.org.ury.database.DatabaseItem; - - -/** - * An item in the URY library. - * - * @author Matt Windsor - */ - -public class LibraryItem extends DatabaseItem<LibraryItemProperty, - String> -{ - public - LibraryItem (Map<LibraryItemProperty, String> properties) - { - super (properties); - } -}
\ No newline at end of file diff --git a/src/uk/org/ury/library/item/LibraryItemProperty.java b/src/uk/org/ury/library/item/LibraryItemProperty.java deleted file mode 100644 index 44f5f22..0000000 --- a/src/uk/org/ury/library/item/LibraryItemProperty.java +++ /dev/null @@ -1,62 +0,0 @@ -package uk.org.ury.library.item; - -/** - * The parameters that are stored in the LibraryItem. - * - * @author Matt Windsor - */ - -public enum LibraryItemProperty - { - // Constant SQL identifier - TITLE ("title"), - ALBUM ("album"), - ARTIST ("artist"), - LABEL ("label"), - STATUS ("status"), - MEDIUM ("medium"), - FORMAT ("format"), - DATE_RELEASED ("datereleased"), - DATE_ADDED ("dateadded"), - DATE_EDITED ("dateedited"), - SHELF_LETTER ("shelfletter"), - SHELF_NUMBER ("shelfnumber"), - CD_ID ("cdid"), - IS_DIGITISED ("digitised"), - IS_CLEAN ("clean"); - - - public final String sql; - - - private - LibraryItemProperty (String sql) - { - this.sql = sql; - } - - - /** - * Retrieve a LibraryItemProperty given its SQL identifier. - * - * @param string The SQL identifier. - * @return The first property to match. - * - * @throws IllegalArgumentException if no matches were - * found. - */ - - public static LibraryItemProperty - getFromSQL (String string) - { - // TODO: Better exception? - - for (LibraryItemProperty prop : values ()) - { - if (prop.sql.equals (string)) - return prop; - } - - throw new IllegalArgumentException ("Nonexistent property SQL."); - } - };
\ No newline at end of file |