OSDN Git Service

android-2.1_r1 snapshot
[android-x86/packages-apps-Gallery2.git] / src / com / cooliris / picasa / Entry.java
1 package com.cooliris.picasa;
2
3 import java.lang.annotation.ElementType;
4 import java.lang.annotation.Retention;
5 import java.lang.annotation.RetentionPolicy;
6 import java.lang.annotation.Target;
7
8 import org.xml.sax.Attributes;
9
10 public abstract class Entry {
11     public static final String[] ID_PROJECTION = { "_id" };
12
13     // The primary key of the entry.
14     @Column("_id")
15     public long id = 0;
16
17     @Retention(RetentionPolicy.RUNTIME)
18     @Target(ElementType.TYPE)
19     public @interface Table {
20         String value();
21     }
22
23     @Retention(RetentionPolicy.RUNTIME)
24     @Target(ElementType.FIELD)
25     public @interface Column {
26         String value();
27
28         boolean indexed() default false;
29
30         boolean fullText() default false;
31     }
32
33     public void clear() {
34         id = 0;
35     }
36
37     public void setPropertyFromXml(String uri, String localName, Attributes attrs, String content) {
38         throw new UnsupportedOperationException("Entry class does not support XML parsing");
39     }
40 }