Index: tck2/src/java/org/apache/jdo/tck/util/signature/Formatter.java =================================================================== --- tck2/src/java/org/apache/jdo/tck/util/signature/Formatter.java (revision 605356) +++ tck2/src/java/org/apache/jdo/tck/util/signature/Formatter.java (working copy) @@ -115,6 +115,10 @@ s.append(method.getName()).append("("); s.append(toString("", method.getParameterTypes())).append(")"); s.append(toString(" throws ", method.getExceptionTypes())); + if (method.getDeclaringClass().isAnnotation() && method.getDefaultValue() != null) { + s.append(" default \"" + method.getDefaultValue() + "\""); + + } return s.toString(); } Index: tck2/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java =================================================================== --- tck2/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java (revision 606496) +++ tck2/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java (working copy) @@ -17,6 +17,7 @@ package org.apache.jdo.tck.util.signature; +import java.lang.reflect.Array; import java.lang.reflect.Member; import java.lang.reflect.Modifier; import java.lang.reflect.Field; @@ -107,7 +108,7 @@ public SignatureVerifier(PrintWriter log, boolean quiet, boolean verbose) { this(SignatureVerifier.class.getClassLoader(), log, quiet, verbose); - } + } // ---------------------------------------------------------------------- // Local Logging Methods @@ -279,6 +280,132 @@ return cls; } + /** Evaluate a value expression from the value of a static field + * or the default value of an annotation method, and compare it to + * the actual value. + * Only supports primitive, enum, array of enum, + * and String. + * @param value the String form of the value from the signature file + * @param type the type as declared in the class + * @param actual the actual value + * @return the description of the expected value, or null if ok + * @throws java.lang.NumberFormatException + */ + protected String checkValue(String value, String type, Object actual) + throws NumberFormatException { + // note array type + boolean isArray = false; + if (type.endsWith("[]")) { + isArray = true; + type = type.substring(0, type.length() - 2); + // remove { from beginning and } from end + value = value.substring(1, value.length() - 1); + } + // only supports primitive types, Class, String, and arrays + final Object exp; + Class expClass; + final boolean ok; + if (type.equals("byte")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(byte.class); + } else { + ok = Byte.valueOf(value).equals(actual); + } + } else if (type.equals("short")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(short.class); + } else { + ok = Short.valueOf(value).equals(actual); + } + } else if (type.equals("int")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(int.class); + } else { + ok = Integer.valueOf(value).equals(actual); + } + } else if (type.equals("long")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(long.class); + } else { + ok = Long.valueOf(value).equals(actual); + } + } else if (type.equals("float")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(float.class); + } else { + ok = Float.valueOf(value).equals(actual); + } + } else if (type.equals("double")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(double.class); + } else { + ok = Double.valueOf(value).equals(actual); + } + } else if (type.equals("char")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(char.class); + } else { + ok = new Character(value.charAt(1)).equals(actual); + } + } else if (type.equals("java.lang.Class")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(Class.class); + } else { + // strip ".class" from type name + int offset = value.indexOf(".class"); + value = value.substring(0, offset); + ok = getClass(value).equals(actual); + } + } else if (type.equals("java.lang.String")) { + if (isArray) { + ok = actual.getClass().getComponentType().equals(String.class); + } else { + // cut off '\"' chars at begin and end + final String s; + if (value.length() > 1) { + s = value.substring(1, value.length() - 1); + } else { + s = ""; + } + ok = (String.valueOf(s)).equals(actual); + } + } else { + // not a primitive type or String; try loading it. + expClass = getClass(type); + if (isArray) { + // check if the actual component type is the right class + ok = actual.getClass().getComponentType().equals(expClass); + } else { + // get the actual value which must be a static class.field + Object expectedValue = null; + try { + // now get actual value; separate value into class and field name + int lastDot = value.lastIndexOf("."); + String expectedClassName = value.substring(0, lastDot); + String expectedFieldName = value.substring(lastDot + 1, value.length()); + Class expectedClass = getClass(expectedClassName); + if (expectedClass == null) throw new ClassNotFoundException(); + Field expectedField = expectedClass.getField(expectedFieldName); + expectedValue = expectedField.get(null); + } catch (NoSuchFieldException ex) { + handleNotLoading(ex); + } catch (SecurityException ex) { + handleNotLoading(ex); + } catch (IllegalArgumentException ex) { + handleNotLoading(ex); + } catch (IllegalAccessException ex) { + handleNotLoading(ex); + } catch (ClassNotFoundException ex) { + handleNotLoading(ex); + } + ok = expectedValue.equals(actual); + } + } + // return message if not ok + if (ok) return null; + else return value; + } + /** Validates a field against a prescribed signature. */ protected void checkField(int mods, String type, String name, String value) { @@ -322,7 +449,7 @@ } // check field value if any - Object fieldValue = null; + Object actualValue = null; if (value != null) { // only support for public, static, and final fields final int m = (Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL); @@ -331,51 +458,27 @@ + "definition in descriptor file;", Formatter.toString(mods, type, name, value)); } else { - // only support for primitive types and String - final Object exp; - if (type.equals("byte")) { - exp = Byte.valueOf(value); - } else if (type.equals("short")) { - exp = Short.valueOf(value); - } else if (type.equals("integer")) { - exp = Integer.valueOf(value); - } else if (type.equals("long")) { - exp = Long.valueOf(value); - } else if (type.equals("float")) { - exp = Float.valueOf(value); - } else if (type.equals("double")) { - exp = Double.valueOf(value); - } else if (type.equals("char")) { - // cut off '\'' char at begin and end - exp = new Character(value.charAt(1)); - } else if (type.equals("java.lang.String")) { - // cut off '\"' chars at begin and end - final String s = value.substring(1, value.length() - 1); - exp = String.valueOf(s); - } else { - exp = null; - } - // compare field's expected with found value try { - fieldValue = field.get(null); + actualValue = field.get(null); } catch (IllegalAccessException ex) { handleProblem("field declaration: cannot access field " + "value, exception: " + ex + ";", Formatter.toString(mods, type, name, value)); } - if (exp != null && !exp.equals(fieldValue)) { + String error = checkValue(value, type, actualValue); + if (error != null) { handleMismatch( "field declaration: non-matching values;", - Formatter.toString(mods, type, name, exp.toString()), - Formatter.toString(field, fieldValue)); + Formatter.toString(mods, type, name, error), + Formatter.toString(field, "\"" + actualValue + "\"")); } } } // field OK members.remove(field); - handleMatch("has field: ", Formatter.toString(field, fieldValue)); + handleMatch("has field: ", Formatter.toString(field, actualValue)); } /** Validates a constructor against a prescribed signature. */ @@ -431,7 +534,8 @@ /** Validates a method against a prescribed signature. */ protected void checkMethod(int mods, String result, String name, - String[] params, String[] excepts) { + String[] params, String[] excepts, + String value) { tested++; params = TypeHelper.qualifiedUserTypeNames(params); excepts = TypeHelper.qualifiedUserTypeNames(excepts); @@ -485,7 +589,29 @@ Formatter.toString(mods, result, name, params, excepts), Formatter.toString(method)); } + + // check default value of an annotation element (method) + if (value != null) { + Object actualValue = null; + try { + actualValue = method.getDefaultValue(); + } catch (Exception ex) { + handleProblem("method declaration: cannot access default " + + "value, exception: " + ex + ";", + Formatter.toString(mods, result, name, value)); + } + // turn value into an object for comparison + String wrong = checkValue(value, result, actualValue); + // compare field's expected with found value + if (wrong != null) { + handleMismatch( + "method declaration: non-matching default value;", + Formatter.toString(mods, result, name + "() default ", wrong), + Formatter.toString(method)); + } + } + // method OK members.remove(method); handleMatch("has method: ", Formatter.toString(method)); @@ -808,6 +934,42 @@ } /** + * Scans for an array literal. + * Limitation: only the empty array "{}" can be scanned. + * @return null if the next token is not an array + */ + protected String scanArrayLiteral() + throws IOException, ParseException { + // parse stored token if any + String t; + if ((t = getLookAhead()) != null) { + if (t.charAt(0) != '{' || t.charAt(1) != '}') { + setLookAhead(t); // not a string literal + return null; + } + return t; + } + + // parse first char + if (!skip()) { + throw new ParseException(msgUnexpectedEOF(), 0); + } + ir.mark(1); + char c = (char)ir.read(); + if (c != '{') { + ir.reset(); // not start of a string literal + return null; + } + c = (char)ir.read(); + if (c != '}') { + ir.reset(); // not start of a string literal + return null; + } + + return "{}"; + } + + /** * Returns the next token to be parsed. * @return never null */ @@ -854,6 +1016,7 @@ if ((t = scanNumberLiteral()) != null) { } else if ((t = scanStringLiteral()) != null) { } else if ((t = scanCharacterLiteral()) != null) { + } else if ((t = scanArrayLiteral()) != null) { } //log.println("parseLiteral() : '" + t + "'"); return t; @@ -873,6 +1036,24 @@ } /** + * Parses the next token and validates that it is a constant, + * which is either a literal or a static member. + * @return the description of the field + */ + protected String demandConstant() + throws IOException, ParseException { + final String literal = parseLiteral(); + if (literal != null) { + return literal; + } + final String field = demandIdentifier(); + if (field == null) { + throw new ParseException(msgUnexpectedToken(parseToken()), 0); + } + return field; + } + + /** * Parses any available Java modifiers. * @return an int value with the parsed modifiers' bit set */ @@ -884,7 +1065,7 @@ final String t = parseToken(); if (t.equals("abstract")) m |= Modifier.ABSTRACT; else if (t.equals("annotation")) m |= (0x2000 + Modifier.ABSTRACT + Modifier.INTERFACE); - else if (t.equals("enum")) m |= 0x4000 + Modifier.FINAL; + else if (t.equals("enum")) m |= 0x4000; else if (t.equals("final")) m |= Modifier.FINAL; else if (t.equals("interface")) m |= Modifier.INTERFACE; else if (t.equals("native")) m |= Modifier.NATIVE; @@ -1033,7 +1214,7 @@ return null; // no member to parse } final String memberName = parseIdentifier(); // null if constructor - + // parse optional field value or parameter+exception list final String value; final String[] params; @@ -1058,12 +1239,17 @@ if (tt.equals("throws")) { excepts = demandIdentifierList(); demandToken(";"); + value = null; } else if (tt.equals(";")) { excepts = new String[]{}; + value = null; + } else if (tt.equals("default")) { + value = demandConstant(); + demandToken(";"); + excepts = new String[]{}; } else { throw new ParseException(msgUnexpectedToken(tt), 0); } - value = null; } else { throw new ParseException(msgUnexpectedToken(tvp), 0); } @@ -1078,7 +1264,7 @@ name = typeOrName; checkConstructor(mods, params, excepts); } else { - checkMethod(mods, typeOrName, memberName, params, excepts); + checkMethod(mods, typeOrName, memberName, params, excepts, value); } } Index: tck2/src/conf/jdo-2_1-signatures.txt =================================================================== --- tck2/src/conf/jdo-2_1-signatures.txt (revision 605800) +++ tck2/src/conf/jdo-2_1-signatures.txt (working copy) @@ -616,7 +616,7 @@ public void evict(Object pc); public varargs void evictAll(Object[] pcs); public void evictAll(java.util.Collection pcs); - public void evictAll(java.lang.Class, boolean); + public void evictAll(Class, boolean); public void evictAll(); public void refresh(Object pc); public varargs void refreshAll(Object[] pcs); @@ -1037,3 +1037,442 @@ public javax.transaction.Synchronization getSynchronization(); public javax.jdo.PersistenceManager getPersistenceManager(); } + +public annotation javax.jdo.annotations.Column extends java.lang.annotation.Annotation +{ + String name() default ""; + String target() default ""; + String targetMember() default ""; + String jdbcType() default ""; + String sqlType() default ""; + int length() default -1; + int scale() default -1; + String allowsNull() default ""; + String defaultValue() default ""; + String insertValue() default ""; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public annotation javax.jdo.annotations.Columns extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.Column[] value(); +} + +public annotation javax.jdo.annotations.DatastoreIdentity extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.IdGeneratorStrategy strategy() default javax.jdo.annotations.IdGeneratorStrategy.UNSPECIFIED; + String customStrategy() default ""; + String sequence() default ""; + String column() default ""; + javax.jdo.annotations.Column[] columns() default {}; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public annotation javax.jdo.annotations.Discriminator extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.DiscriminatorStrategy strategy() + default javax.jdo.annotations.DiscriminatorStrategy.UNSPECIFIED; + String customStrategy() default ""; + String indexed() default ""; + String column() default ""; + String value() default ""; + javax.jdo.annotations.Column[] columns() default {}; +} + +public final enum javax.jdo.annotations.DiscriminatorStrategy extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.DiscriminatorStrategy UNSPECIFIED; + public static final enum javax.jdo.annotations.DiscriminatorStrategy NONE; + public static final enum javax.jdo.annotations.DiscriminatorStrategy VALUE_MAP; + public static final enum javax.jdo.annotations.DiscriminatorStrategy CLASS_NAME; + public static javax.jdo.annotations.DiscriminatorStrategy valueOf(java.lang.String); + public static final javax.jdo.annotations.DiscriminatorStrategy[] values(); +} + +public annotation javax.jdo.annotations.Element extends java.lang.annotation.Annotation +{ + Class[] types() default {}; + String serialized() default ""; + String embedded() default ""; + javax.jdo.annotations.Embedded[] embeddedMapping() default {}; + String dependent() default ""; + String table() default ""; + String column() default ""; + javax.jdo.annotations.ForeignKeyAction deleteAction() default javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED; + javax.jdo.annotations.ForeignKeyAction updateAction() default javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED; + String indexed() default ""; + String index() default ""; + String unique() default ""; + String uniqueKey() default ""; + String mappedBy() default ""; + javax.jdo.annotations.Column[] columns() default {}; + String generateForeignKey() default ""; + String foreignKey() default ""; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public annotation javax.jdo.annotations.Embedded extends java.lang.annotation.Annotation +{ + String ownerMember() default ""; + String nullIndicatorColumn() default ""; + String nullIndicatorValue() default ""; + javax.jdo.annotations.Persistent[] members() default {}; +} + +public annotation javax.jdo.annotations.EmbeddedOnly extends java.lang.annotation.Annotation +{ +} + +public annotation javax.jdo.annotations.Extension extends java.lang.annotation.Annotation +{ + String vendorName(); + String key(); + String value(); +} + +public annotation javax.jdo.annotations.Extensions extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.Extension[] value(); +} + +public annotation javax.jdo.annotations.FetchGroup extends java.lang.annotation.Annotation +{ + String name() default ""; + String postLoad() default ""; + javax.jdo.annotations.Persistent[] members(); + String[] fetchGroups() default {}; +} + +public annotation javax.jdo.annotations.FetchGroups extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.FetchGroup[] value(); +} + +public annotation javax.jdo.annotations.FetchPlan extends java.lang.annotation.Annotation +{ + String name() default ""; + String[] fetchGroups() default {}; + int maxFetchDepth() default 1; + int fetchSize() default 0; +} + +public annotation javax.jdo.annotations.FetchPlans extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.FetchPlan[] value(); +} + +public annotation javax.jdo.annotations.ForeignKey extends java.lang.annotation.Annotation +{ + String name() default ""; + String table() default ""; + String deferred() default ""; + String unique() default ""; + javax.jdo.annotations.ForeignKeyAction deleteAction() default javax.jdo.annotations.ForeignKeyAction.RESTRICT; + javax.jdo.annotations.ForeignKeyAction updateAction() default javax.jdo.annotations.ForeignKeyAction.RESTRICT; + String[] members() default {}; + javax.jdo.annotations.Column[] columns() default {}; +} + +public final enum javax.jdo.annotations.ForeignKeyAction extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.ForeignKeyAction UNSPECIFIED; + public static final enum javax.jdo.annotations.ForeignKeyAction RESTRICT; + public static final enum javax.jdo.annotations.ForeignKeyAction CASCADE; + public static final enum javax.jdo.annotations.ForeignKeyAction NULL; + public static final enum javax.jdo.annotations.ForeignKeyAction DEFAULT; + public static final enum javax.jdo.annotations.ForeignKeyAction NONE; + public static javax.jdo.annotations.ForeignKeyAction valueOf(java.lang.String); + public static final javax.jdo.annotations.ForeignKeyAction[] values(); +} + +public annotation javax.jdo.annotations.ForeignKeys extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.ForeignKey[] value(); +} + +public final enum javax.jdo.annotations.IdGeneratorStrategy extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.IdGeneratorStrategy UNSPECIFIED; + public static final enum javax.jdo.annotations.IdGeneratorStrategy NATIVE; + public static final enum javax.jdo.annotations.IdGeneratorStrategy SEQUENCE; + public static final enum javax.jdo.annotations.IdGeneratorStrategy IDENTITY; + public static final enum javax.jdo.annotations.IdGeneratorStrategy INCREMENT; + public static final enum javax.jdo.annotations.IdGeneratorStrategy UUIDSTRING; + public static final enum javax.jdo.annotations.IdGeneratorStrategy UUIDHEX; + public static javax.jdo.annotations.IdGeneratorStrategy valueOf(java.lang.String); + public static final javax.jdo.annotations.IdGeneratorStrategy[] values(); +} + +public final enum javax.jdo.annotations.IdentityType extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.IdentityType UNSPECIFIED; + public static final enum javax.jdo.annotations.IdentityType APPLICATION; + public static final enum javax.jdo.annotations.IdentityType DATASTORE; + public static final enum javax.jdo.annotations.IdentityType NONDURABLE; + public static javax.jdo.annotations.IdentityType valueOf(java.lang.String); + public static final javax.jdo.annotations.IdentityType[] values(); +} + +public annotation javax.jdo.annotations.Index extends java.lang.annotation.Annotation +{ + String name() default ""; + String table() default ""; + String unique() default ""; + String[] members() default {}; + javax.jdo.annotations.Column[] columns() default {}; +} + +public annotation javax.jdo.annotations.Indices extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.Index[] value(); +} + +public annotation javax.jdo.annotations.Inheritance extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.InheritanceStrategy strategy() default javax.jdo.annotations.InheritanceStrategy.UNSPECIFIED; + String customStrategy() default ""; +} + +public final enum javax.jdo.annotations.InheritanceStrategy extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.InheritanceStrategy UNSPECIFIED; + public static final enum javax.jdo.annotations.InheritanceStrategy NEW_TABLE; + public static final enum javax.jdo.annotations.InheritanceStrategy SUBCLASS_TABLE; + public static final enum javax.jdo.annotations.InheritanceStrategy SUPERCLASS_TABLE; + public static javax.jdo.annotations.InheritanceStrategy valueOf(java.lang.String); + public static final javax.jdo.annotations.InheritanceStrategy[] values(); +} + +public annotation javax.jdo.annotations.Join extends java.lang.annotation.Annotation +{ + String table() default ""; + String column() default ""; + String indexed() default ""; + String index() default ""; + String unique() default ""; + String uniqueKey() default ""; + String outer() default ""; + javax.jdo.annotations.ForeignKeyAction deleteAction() default javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED; + javax.jdo.annotations.Column[] columns() default {}; + String generatePrimaryKey() default ""; + String primaryKey() default ""; + String generateForeignKey() default ""; + String foreignKey() default ""; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public annotation javax.jdo.annotations.Joins extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.Join[] value(); +} + +public annotation javax.jdo.annotations.Key extends java.lang.annotation.Annotation +{ + Class[] types() default {}; + String serialized() default ""; + String embedded() default ""; + javax.jdo.annotations.Embedded[] embeddedMapping() default {}; + String dependent() default ""; + String table() default ""; + String column() default ""; + javax.jdo.annotations.ForeignKeyAction deleteAction() default javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED; + javax.jdo.annotations.ForeignKeyAction updateAction() default javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED; + String indexed() default ""; + String index() default ""; + String unique() default ""; + String uniqueKey() default ""; + String mappedBy() default ""; + javax.jdo.annotations.Column[] columns() default {}; + String generateForeignKey() default ""; + String foreignKey() default ""; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public annotation javax.jdo.annotations.NotPersistent extends java.lang.annotation.Annotation +{ +} + +public final enum javax.jdo.annotations.NullValue extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.NullValue NONE; + public static final enum javax.jdo.annotations.NullValue EXCEPTION; + public static final enum javax.jdo.annotations.NullValue DEFAULT; + public static javax.jdo.annotations.NullValue valueOf(java.lang.String); + public static final javax.jdo.annotations.NullValue[] values(); +} + +public annotation javax.jdo.annotations.Order extends java.lang.annotation.Annotation +{ + String column() default ""; + String mappedBy() default ""; + javax.jdo.annotations.Column[] columns() default {}; +} + +public annotation javax.jdo.annotations.PersistenceAware extends java.lang.annotation.Annotation +{ +} + +public annotation javax.jdo.annotations.PersistenceCapable extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.Persistent[] members() default {}; + String table() default ""; + String catalog() default ""; + String schema() default ""; + String requiresExtent() default ""; + String embeddedOnly() default ""; + String detachable() default ""; + javax.jdo.annotations.IdentityType identityType() default javax.jdo.annotations.IdentityType.UNSPECIFIED; + Class objectIdClass() default void.class; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public final enum javax.jdo.annotations.PersistenceModifier extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.PersistenceModifier UNSPECIFIED; + public static final enum javax.jdo.annotations.PersistenceModifier PERSISTENT; + public static final enum javax.jdo.annotations.PersistenceModifier TRANSACTIONAL; + public static final enum javax.jdo.annotations.PersistenceModifier NONE; + public static javax.jdo.annotations.PersistenceModifier valueOf(java.lang.String); + public static final javax.jdo.annotations.PersistenceModifier[] values(); +} + +public annotation javax.jdo.annotations.Persistent extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.PersistenceModifier persistenceModifier() + default javax.jdo.annotations.PersistenceModifier.UNSPECIFIED; + String table() default ""; + String defaultFetchGroup() default ""; + javax.jdo.annotations.NullValue nullValue() default javax.jdo.annotations.NullValue.NONE; + String embedded() default ""; + String embeddedElement() default ""; + String embeddedKey() default ""; + String embeddedValue() default ""; + String serialized() default ""; + String serializedElement() default ""; + String serializedKey() default ""; + String serializedValue() default ""; + String dependent() default ""; + String dependentElement() default ""; + String dependentKey() default ""; + String dependentValue() default ""; + String primaryKey() default ""; + javax.jdo.annotations.IdGeneratorStrategy valueStrategy() default javax.jdo.annotations.IdGeneratorStrategy.UNSPECIFIED; + String customValueStrategy() default ""; + String sequence() default ""; + String loadFetchGroup() default ""; + Class[] types() default {}; + String mappedBy() default ""; + javax.jdo.annotations.Column[] columns() default {}; + String column() default ""; + String nullIndicatorColumn() default ""; + String name() default ""; + int recursionDepth() default 1; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public annotation javax.jdo.annotations.PrimaryKey extends java.lang.annotation.Annotation +{ + String name() default ""; + String column() default ""; + javax.jdo.annotations.Column[] columns() default {}; +} + +public annotation javax.jdo.annotations.Queries extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.Query[] value(); +} + +public annotation javax.jdo.annotations.Query extends java.lang.annotation.Annotation +{ + String name(); + String value(); + String language() default "JDOQL"; + String unmodifiable() default ""; + String unique() default ""; + Class resultClass() default void.class; + String fetchPlan() default ""; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public annotation javax.jdo.annotations.Sequence extends java.lang.annotation.Annotation +{ + String name(); + javax.jdo.annotations.SequenceStrategy strategy(); + String datastoreSequence() default ""; + Class factoryClass() default void.class; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public final enum javax.jdo.annotations.SequenceStrategy extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.SequenceStrategy NONTRANSACTIONAL; + public static final enum javax.jdo.annotations.SequenceStrategy CONTIGUOUS; + public static final enum javax.jdo.annotations.SequenceStrategy NONCONTIGUOUS; + public static javax.jdo.annotations.SequenceStrategy valueOf(java.lang.String); + public static final javax.jdo.annotations.SequenceStrategy[] values(); +} + +public annotation javax.jdo.annotations.Serialized extends java.lang.annotation.Annotation +{ +} + +public annotation javax.jdo.annotations.Transactional extends java.lang.annotation.Annotation +{ +} + +public annotation javax.jdo.annotations.Unique extends java.lang.annotation.Annotation +{ + String name() default ""; + String table() default ""; + String deferred() default ""; + String[] members() default {}; + javax.jdo.annotations.Column[] columns() default {}; +} + +public annotation javax.jdo.annotations.Uniques extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.Unique[] value(); +} + +public annotation javax.jdo.annotations.Value extends java.lang.annotation.Annotation +{ + Class[] types() default {}; + String serialized() default ""; + String embedded() default ""; + javax.jdo.annotations.Embedded[] embeddedMapping() default {}; + String dependent() default ""; + String table() default ""; + String column() default ""; + javax.jdo.annotations.ForeignKeyAction deleteAction() default javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED; + javax.jdo.annotations.ForeignKeyAction updateAction() default javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED; + String indexed() default ""; + String index() default ""; + String unique() default ""; + String uniqueKey() default ""; + String mappedBy() default ""; + javax.jdo.annotations.Column[] columns() default {}; + String generateForeignKey() default ""; + String foreignKey() default ""; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public annotation javax.jdo.annotations.Version extends java.lang.annotation.Annotation +{ + javax.jdo.annotations.VersionStrategy strategy() default javax.jdo.annotations.VersionStrategy.UNSPECIFIED; + String customStrategy() default ""; + String column() default ""; + String indexed() default ""; + javax.jdo.annotations.Column[] columns() default {}; + javax.jdo.annotations.Extension[] extensions() default {}; +} + +public final enum javax.jdo.annotations.VersionStrategy extends java.lang.Enum +{ + public static final enum javax.jdo.annotations.VersionStrategy UNSPECIFIED; + public static final enum javax.jdo.annotations.VersionStrategy NONE; + public static final enum javax.jdo.annotations.VersionStrategy STATE_IMAGE; + public static final enum javax.jdo.annotations.VersionStrategy DATE_TIME; + public static final enum javax.jdo.annotations.VersionStrategy VERSION_NUMBER; + public static javax.jdo.annotations.VersionStrategy valueOf(java.lang.String); + public static final javax.jdo.annotations.VersionStrategy[] values(); +} \ No newline at end of file