Index: ClassMetadata.java =================================================================== --- ClassMetadata.java (revision 776348) +++ ClassMetadata.java (working copy) @@ -22,7 +22,7 @@ * Represents a class. * @since 2.3 */ -public interface ClassMetadata extends ComponentMetadata { +public interface ClassMetadata extends TypeMetadata { /** * Method to define the persistence modifier. * @param mod persistence modifier Index: TypeMetadata.java =================================================================== --- TypeMetadata.java (revision 776348) +++ TypeMetadata.java (working copy) @@ -24,7 +24,7 @@ * Represents a class or interface. Extended for the specifics of those cases. * @since 2.3 */ -public interface ComponentMetadata extends Metadata { +public interface TypeMetadata extends Metadata { /** * Accessor for the name of this component (set on construction). * @@ -37,7 +37,7 @@ * * @param id identity type */ - ComponentMetadata setIdentityType(IdentityType id); + TypeMetadata setIdentityType(IdentityType id); /** * Accessor for the identity type to use. @@ -51,7 +51,7 @@ * * @param idclass Object-id class */ - ComponentMetadata setObjectIdClass(String idclass); + TypeMetadata setObjectIdClass(String idclass); /** * Accessor for the object-id class (if defined). @@ -65,7 +65,7 @@ * * @param extent Requires extent? */ - ComponentMetadata setRequiresExtent(boolean extent); + TypeMetadata setRequiresExtent(boolean extent); /** * Accessor for whether the component requires an extent. @@ -79,7 +79,7 @@ * * @param detachable Detachable? */ - ComponentMetadata setDetachable(boolean detachable); + TypeMetadata setDetachable(boolean detachable); /** * Accessor for whether this is detachable. @@ -93,7 +93,7 @@ * * @param cacheable Cacheable? */ - ComponentMetadata setCacheable(boolean cacheable); + TypeMetadata setCacheable(boolean cacheable); /** * Accessor for whether this is cacheable. @@ -107,7 +107,7 @@ * * @param flag serializeRead */ - ComponentMetadata setSerializeRead(boolean flag); + TypeMetadata setSerializeRead(boolean flag); /** * Accessor for the value of serializeRead for objects of this type. @@ -121,7 +121,7 @@ * * @param embedded Whether it is only stored embedded */ - ComponentMetadata setEmbeddedOnly(boolean embedded); + TypeMetadata setEmbeddedOnly(boolean embedded); /** * Accessor for whether this is embedded only. @@ -135,7 +135,7 @@ * * @param catalog Catalog name */ - ComponentMetadata setCatalog(String catalog); + TypeMetadata setCatalog(String catalog); /** * Accessor for the catalog (ORM) for this component @@ -149,7 +149,7 @@ * * @param schema Schema name */ - ComponentMetadata setSchema(String schema); + TypeMetadata setSchema(String schema); /** * Accessor for the schema (ORM) for this component @@ -163,7 +163,7 @@ * * @param table Table name */ - ComponentMetadata setTable(String table); + TypeMetadata setTable(String table); /** * Accessor for the name of the table. Index: InterfaceMetadata.java =================================================================== --- InterfaceMetadata.java (revision 776348) +++ InterfaceMetadata.java (working copy) @@ -20,6 +20,6 @@ * Represents a persistent-interface. * @since 2.3 */ -public interface InterfaceMetadata extends ComponentMetadata { +public interface InterfaceMetadata extends TypeMetadata { } \ No newline at end of file Index: ComponentMetadata.java =================================================================== --- ComponentMetadata.java (revision 776348) +++ ComponentMetadata.java (working copy) @@ -1,410 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package javax.jdo.metadata; - -import java.lang.reflect.Method; - -import javax.jdo.annotations.IdentityType; - -/** - * Represents a class or interface. Extended for the specifics of those cases. - * @since 2.3 - */ -public interface ComponentMetadata extends Metadata { - /** - * Accessor for the name of this component (set on construction). - * - * @return The name - */ - String getName(); - - /** - * Method to define the identity type to use. - * - * @param id identity type - */ - ComponentMetadata setIdentityType(IdentityType id); - - /** - * Accessor for the identity type to use. - * - * @return identity type - */ - IdentityType getIdentityType(); - - /** - * Method to set the object-id (PK) class. - * - * @param idclass Object-id class - */ - ComponentMetadata setObjectIdClass(String idclass); - - /** - * Accessor for the object-id class (if defined). - * - * @return The object-id class - */ - String getObjectIdClass(); - - /** - * Method to set whether the component requires an extent. - * - * @param extent Requires extent? - */ - ComponentMetadata setRequiresExtent(boolean extent); - - /** - * Accessor for whether the component requires an extent. - * - * @return Requires extent? - */ - boolean getRequiresExtent(); - - /** - * Method to set whether this is detachable - * - * @param detachable Detachable? - */ - ComponentMetadata setDetachable(boolean detachable); - - /** - * Accessor for whether this is detachable. - * - * @return Detachable? - */ - boolean getDetachable(); - - /** - * Method to set whether this is cacheable - * - * @param cacheable Cacheable? - */ - ComponentMetadata setCacheable(boolean cacheable); - - /** - * Accessor for whether this is cacheable. - * - * @return Detachable? - */ - boolean getCacheable(); - - /** - * Method to set the default value of serializeRead for objects of this type. - * - * @param flag serializeRead - */ - ComponentMetadata setSerializeRead(boolean flag); - - /** - * Accessor for the value of serializeRead for objects of this type. - * - * @return SerializeRead? - */ - boolean getSerializeRead(); - - /** - * Method to set whether it is stored only as embedded in other objects. - * - * @param embedded Whether it is only stored embedded - */ - ComponentMetadata setEmbeddedOnly(boolean embedded); - - /** - * Accessor for whether this is embedded only. - * - * @return Only stored as embedded - */ - Boolean getEmbeddedOnly(); - - /** - * Method to set the catalog (ORM) for this component - * - * @param catalog Catalog name - */ - ComponentMetadata setCatalog(String catalog); - - /** - * Accessor for the catalog (ORM) for this component - * - * @return The catalog - */ - String getCatalog(); - - /** - * Method to set the schema (ORM) for this component - * - * @param schema Schema name - */ - ComponentMetadata setSchema(String schema); - - /** - * Accessor for the schema (ORM) for this component - * - * @return The schema - */ - String getSchema(); - - /** - * Method to set the table name. - * - * @param table Table name - */ - ComponentMetadata setTable(String table); - - /** - * Accessor for the name of the table. - * - * @return The name - */ - String getTable(); - - /** - * Method to define the inheritance metadata. - * - * @return The InheritanceMetadata - */ - InheritanceMetadata newInheritanceMetadata(); - - /** - * Accessor for the inheritance (if any). - * - * @return inheritance - */ - InheritanceMetadata getInheritanceMetadata(); - - /** - * Method to define the version metadata. - * - * @return The VersionMetadata - */ - VersionMetadata newVersionMetadata(); - - /** - * Accessor for the version (if any). - * - * @return version - */ - VersionMetadata getVersionMetadata(); - - /** - * Method to define the datastore identity metadata details. - * - * @return The DatastoreIdentityMetadata - */ - DatastoreIdentityMetadata newDatastoreIdentityMetadata(); - - /** - * Accessor for the datastore identity details. - * - * @return datastore identity details - */ - DatastoreIdentityMetadata getDatastoreIdentityMetadata(); - - /** - * Method to define the primary key details. - * - * @return The PrimaryKeyMetadata - */ - PrimaryKeyMetadata newPrimaryKeyMetadata(); - - /** - * Accessor for the primary key (if any). - * - * @return primary key details - */ - PrimaryKeyMetadata getPrimaryKeyMetadata(); - - /** - * Accessor for all joins(s) defined on the component. - * - * @return The join(s) - */ - JoinMetadata[] getJoins(); - - /** - * Add a join for this component. - * - * @return The JoinMetadata - */ - JoinMetadata newJoinMetadata(); - - /** - * Accessor for the number of join(s) defined for this component. - * - * @return The number of join(s) - */ - int getNumberOfJoins(); - - /** - * Accessor for all fk(s) defined on the component. - * - * @return The fk(s) - */ - ForeignKeyMetadata[] getForeignKeys(); - - /** - * Add a new FK for this component. - * - * @return The ForeignKeyMetadata - */ - ForeignKeyMetadata newForeignKeyMetadata(); - - /** - * Accessor for the number of FKs defined for this component. - * - * @return The number of FKs - */ - int getNumberOfForeignKeys(); - - /** - * Accessor for all index(s) defined on the component. - * - * @return The index(s) - */ - IndexMetadata[] getIndices(); - - /** - * Add a new index for this component. - * - * @return The IndexMetadata - */ - IndexMetadata newIndexMetadata(); - - /** - * Accessor for the number of indices defined for this component. - * - * @return The number of indices - */ - int getNumberOfIndices(); - - /** - * Accessor for all unique constraints defined on the component. - * - * @return The unique constraints - */ - UniqueMetadata[] getUniques(); - - /** - * Add a new unique constraint for this component. - * - * @return The UniqueMetadata - */ - UniqueMetadata newUniqueMetadata(); - - /** - * Accessor for the number of unique constraints defined for this component. - * - * @return The number of unique constraints - */ - int getNumberOfUniques(); - - /** - * Accessor for all fields/properties defined on the component. - * - * @return The members - */ - MemberMetadata[] getMembers(); - - /** - * Accessor for the number of fields/properties defined for this component. - * - * @return The number of members - */ - int getNumberOfMembers(); - - /** - * Add a new property for this component. - * - * @param name Name of the property - * @return The PropertyMetadata - */ - PropertyMetadata newPropertyMetadata(String name); - - /** - * Add a new property for this component. - * - * @param method Java bean getter/setter method - * @return The PropertyMetadata - */ - PropertyMetadata newPropertyMetadata(Method method); - - /** - * Accessor for all named queries defined on the component. - * - * @return The queries - */ - QueryMetadata[] getQueries(); - - /** - * Add a new query for this component. - * - * @param name - * Name of the query to add - * @return The QueryMetadata - */ - QueryMetadata newQueryMetadata(String name); - - /** - * Accessor for the number of named queries defined for this component. - * - * @return The number of named queries - */ - int getNumberOfQueries(); - - /** - * Accessor for all FetchGroup defined on the component. - * - * @return The FetchGroups - */ - FetchGroupMetadata[] getFetchGroups(); - - /** - * Add a new FetchGroup for this component. - * - * @param name Name of the FetchGroup - * @return The FetchGroupMetadata - */ - FetchGroupMetadata newFetchGroupMetadata(String name); - - /** - * Accessor for the number of fetchGroups defined for this component. - * - * @return The number of fetch groups - */ - int getNumberOfFetchGroups(); - - /** - * Accessor for all column(s) defined on the join. - * - * @return The column(s) - */ - ColumnMetadata[] getColumns(); - - /** - * Add a new column for this join. - * - * @return The ColumnMetadata - */ - ColumnMetadata newColumnMetadata(); - - /** - * Accessor for the number of columns defined for this join. - * - * @return The number of columns - */ - int getNumberOfColumns(); -} \ No newline at end of file