db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r158176 [53/79] - in incubator/jdo/trunk/ri11: ./ src/ src/conf/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/jdo/ src/java/org/apache/jdo/ejb/ src/java/org/apache/jdo/enhancer/ src/java/org/apache/jdo/impl/ src/java/org/apache/jdo/impl/enhancer/ src/java/org/apache/jdo/impl/enhancer/classfile/ src/java/org/apache/jdo/impl/enhancer/core/ src/java/org/apache/jdo/impl/enhancer/generator/ src/java/org/apache/jdo/impl/enhancer/meta/ src/java/org/apache/jdo/impl/enhancer/meta/model/ src/java/org/apache/jdo/impl/enhancer/meta/prop/ src/java/org/apache/jdo/impl/enhancer/meta/util/ src/java/org/apache/jdo/impl/enhancer/util/ src/java/org/apache/jdo/impl/fostore/ src/java/org/apache/jdo/impl/jdoql/ src/java/org/apache/jdo/impl/jdoql/jdoqlc/ src/java/org/apache/jdo/impl/jdoql/scope/ src/java/org/apache/jdo/impl/jdoql/tree/ src/java/org/apache/jdo/impl/model/ src/java/org/apache/jdo/impl/model/java/ src/java/org/apache/jdo/impl/model/java/runtime/ src/java/org/apache/jdo/impl/model/jdo/ src/java/org/apache/jdo/impl/model/jdo/caching/ src/java/org/apache/jdo/impl/model/jdo/util/ src/java/org/apache/jdo/impl/model/jdo/xml/ src/java/org/apache/jdo/impl/pm/ src/java/org/apache/jdo/impl/sco/ src/java/org/apache/jdo/impl/state/ src/java/org/apache/jdo/jdoql/ src/java/org/apache/jdo/jdoql/tree/ src/java/org/apache/jdo/model/ src/java/org/apache/jdo/model/java/ src/java/org/apache/jdo/model/jdo/ src/java/org/apache/jdo/pm/ src/java/org/apache/jdo/sco/ src/java/org/apache/jdo/state/ src/java/org/apache/jdo/store/ src/java/org/apache/jdo/util/ test/ test/conf/ test/enhancer/ test/enhancer/sempdept/ test/enhancer/sempdept/src/ test/enhancer/sempdept/src/empdept/ test/fsuid2/ test/fsuid2/org/ test/fsuid2/org/apache/ test/fsuid2/org/apache/jdo/ test/fsuid2/org/apache/jdo/pc/ test/java/ test/java/org/ test/java/org/apache/ test/java/org/apache/jdo/ test/java/org/apache/jdo/impl/ test/java/org/apache/jdo/impl/fostore/ test/java/org/apache/jdo/pc/ test/java/org/apache/jdo/pc/appid/ test/java/org/apache/jdo/pc/empdept/ test/java/org/apache/jdo/pc/serializable/ test/java/org/apache/jdo/pc/xempdept/ test/java/org/apache/jdo/test/ test/java/org/apache/jdo/test/query/ test/java/org/apache/jdo/test/util/ test/jdo/ test/jdo/org/ test/jdo/org/apache/ test/jdo/org/apache/jdo/ test/jdo/org/apache/jdo/pc/ test/jdo/org/apache/jdo/pc/appid/ test/jdo/org/apache/jdo/pc/empdept/ test/jdo/org/apache/jdo/pc/serializable/ test/jdo/org/apache/jdo/pc/xempdept/ xdocs/
Date Sat, 19 Mar 2005 01:06:11 GMT
Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/NotEqualsExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/NotEqualsExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/NotEqualsExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/NotEqualsExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a not equals operator.
+ * A not equals operator is a binary expression.
+ * The string representation of this operator is <code>!=</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface NotEqualsExpression extends BinaryExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/NotExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/NotExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/NotExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/NotExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a logical not operator.
+ * A logical not operator is a unary expression.
+ * The string representation of this operator is <code>!</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface NotExpression extends UnaryExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/OrExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/OrExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/OrExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/OrExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a bitwise or logical or operator depending on the result
+ * types of its children. A bitwise operator is based on arithmetical types.
+ * In contrast, a logical operator is based on boolean types.
+ * The string representation of this operator is <code>|</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface OrExpression extends BinaryExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/OrderingExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/OrderingExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/OrderingExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/OrderingExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents an ordering expression. Examples of ordering expressions
+ * are <code>AscendingOrderingExpression</code> and
+ * <code>DescendingOrderingExpression</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface OrderingExpression extends Node
+{
+    /**
+     * Returns the node's ordering expression.
+     * @return the node's expression
+     */
+    public Expression getOrdering();
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ParameterAccessExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ParameterAccessExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ParameterAccessExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ParameterAccessExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a parameter access expression.
+ * It does not have any children.
+ *
+ * @author Michael Watzek
+ */
+public interface ParameterAccessExpression extends IdentifierExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ParameterDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ParameterDeclaration.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ParameterDeclaration.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ParameterDeclaration.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a parameter access expression.
+ * It does not have any children.
+ *
+ * @author Michael Watzek
+ */
+public interface ParameterDeclaration extends Declaration
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/PlusExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/PlusExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/PlusExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/PlusExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a binary plus operator.
+ * The string representation of this operator is <code>+</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface PlusExpression extends BinaryExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/QueryTree.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/QueryTree.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/QueryTree.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/QueryTree.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Instances of classes implementing this interface
+ * represent the root of a query tree.
+ * You can use these intances to factorize this node's children, as there are
+ * candidate class, declarations, filter expression and
+ * ordering expressions as children.
+ *
+ * @author Michael Watzek
+ */
+public interface QueryTree extends ExpressionFactory, Node
+{
+    /**
+     * Sets the candidate class for this query tree.
+     * @param clazz the candidate class
+     */
+    public void setCandidateClass(Class clazz);
+
+    /**
+     * Declares a parameter for this query tree.
+     * Once you have declared a parameter, you can access it using method
+     * <code>newIdentifier</code>.
+     * @param type the instance of a Java class which is the type of the declared parameter
+     * @param parameter the name of the declared parameter
+     */
+    public void declareParameter(Class type, String parameter);
+
+    /**
+     * Declares a variable for this query tree.
+     * Once you have declared a variable, you can access it using method
+     * <code>newIdentifier</code>.
+     * @param type the instance of a Java class which is the type of the declared variable
+     * @param variable the name of the declared variable
+     */
+    public void declareVariable(Class type, String variable);
+
+    /**
+     * Sets the filter expression for this query tree.
+     * @param filter the filter expression
+     */
+    public void setFilter(Expression filter);
+
+    /**
+     * Adds an ascending ordering expression to this query tree.
+     * The order of adding ascending and descending ordering expressions defines
+     * the order of instances in the result collection of an executed query
+     * instance corresponding with this query tree.
+     * @param expression the order expression
+     */
+    public void addAscendingOrdering(Expression expression);
+
+    /**
+     * Adds an descending ordering expression to this query tree.
+     * The order of adding ascending and descending ordering expressions defines
+     * the order of instances in the result collection of an executed query
+     * instance corresponding with this query tree.
+     * @param expression the order expression
+     */
+    public void addDescendingOrdering(Expression expression);
+
+    /**
+     * Returns the candidate class.
+     * @return the candidate class
+     */
+    public Class getCandidateClass();
+
+
+    /**
+     * Returns a map containing all declared parameters.
+     * This map contains parameter names as keys and instances of
+     * <code>ParameterDeclaration</code> as values.
+     * @return the map of declared parameters
+     */
+    public Map getDeclaredParameters();
+    /**
+     * Returns a map containing all declared variables.
+     * This map contains variable names as keys and instances of
+     * <code>VariableDeclaration</code> as values.
+     * @return the map of declared variables
+     */
+    public Map getDeclaredVariables();
+
+    /**
+     * Returns a list of all declared parameters. The order of entries is
+     * defined by the order of calls <code>declareParameter</code>.
+     * This list contains instances of
+     * <code>ParametersDeclaration</code> as entries.
+     * @return the list of declared parameters
+     */
+    public List getDeclaredParametersAsList();
+
+    /**
+     * Returns the filter expression of this query tree.
+     * @return the filter or null.
+     */
+    public Expression getFilter();
+
+    /**
+     * Returns a list of all added ordering expressions.
+     * The order of entries is defined by the order of calls
+     * <code>addAscendingOrdering</code> and <code>addDescendingOrdering</code>.
+     * This list contains instances of
+     * <code>OrderingExpression</code> as entries.
+     * @return the list of declared parameters
+     */
+    public List getOrderingExpressions();
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ShortLiteralExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ShortLiteralExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ShortLiteralExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ShortLiteralExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a short literal. It does not have any children.
+ *
+ * @author Michael Watzek
+ */
+public interface ShortLiteralExpression extends ConstantExpression
+{
+    /**
+     * Returns the short value represented by this expression.
+     * @return the short value
+     */
+    public short getShort();
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/StartsWithCallExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/StartsWithCallExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/StartsWithCallExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/StartsWithCallExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents the method call expression
+ * <code>String.startsWith</code>. Children of this node are a target
+ * expression (e.g. a <code>FieldAccessExpression</code>) and the method
+ * argument which is an arbitrary expression.
+ *
+ * @author Michael Watzek
+ */
+public interface StartsWithCallExpression extends MethodCallExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/StaticFieldAccessExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/StaticFieldAccessExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/StaticFieldAccessExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/StaticFieldAccessExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+import javax.jdo.PersistenceManager;
+
+import org.apache.jdo.jdoql.JDOQueryException;
+
+/**
+ * This node represents a static field access expression.
+ * It inherits from <code>IdentifierExpression</code>.
+ * Static Field access expressions have exactly one child, the type of the clazz
+ * containing the static field.
+ *
+ * @author Michael Watzek
+ */
+public interface StaticFieldAccessExpression extends IdentifierExpression
+{
+    /**
+     * Returns the value of the field corresponding with this static
+     * field access expression.
+     * @param pm the persistence manager of the query
+     * @return the field value
+     * @exception JDOQueryException if access to the corresponding field of this
+     * expression is denied
+     */
+    public Object getFieldValue(PersistenceManager pm);
+}
+

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ThisExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ThisExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ThisExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ThisExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents an access to <code>this</code>.
+ * It does not have any children.
+ *
+ * @author Michael Watzek
+ */
+public interface ThisExpression extends IdentifierExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/TimesExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/TimesExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/TimesExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/TimesExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a times operator.
+ * A times operator is a binary expression.
+ * The string representation of this operator is <code>*</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface TimesExpression extends BinaryExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/TreeWalker.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/TreeWalker.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/TreeWalker.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/TreeWalker.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * An instance of this class is used to walk any query node. It provides
+ * a walk method which takes a node and a node visitor as arguments. It delegates
+ * to methods <code>Node.arrive</code>, <code>Node.leave/code> and
+ * <code>Node.walkNextChild</code>. Node implementations are required
+ * to delegate these calls to corresponding methods of the supplied node
+ * visitor.
+ *
+ * @author Michael Watzek
+ */
+public final class TreeWalker
+{
+    /**
+     * Walks the tree specified by the argument <code>node</code>
+     * implementing a depth first algorithm.
+     * Executes the visitor instance callback <code>arrive</code>
+     * when starting to walk the argument <code>node</code>.
+     * Subsequently iterates that node's children and
+     * executes the visitor instance callback <code>walkNextChild</code>
+     * before the current child is walked. For the case that
+     * <code>walkNextChild</code> returns <code>true</code>,
+     * this tree walker walkes the next child.
+     * Otherwise, the next child and all remaining childs are not walked.
+     * In both cases, this tree walker
+     * executes the visitor instance callback <code>leave</code> indicating
+     * that the argument <code>node</code> and its children have been walked.
+     * The result of <code>leave</code> is returned.
+     * when starting to traverse a node.
+     * @param node the tree instance
+     * @param visitor the node visitor instance
+     * @return the object returned by the visitor instance callback <code>leave</code>
+     */
+    public Object walk(Node node, NodeVisitor visitor)
+    {
+        if( node!=null )
+        {   node.arrive( visitor );
+            Object[] results = null;
+            Node[] children = node.getChildren();
+            if( children!=null )
+            {   results = new Object[children.length];
+                for( int i=0; i<children.length; i++ )
+                {   Object resultOfPrevChild = i==0 ? null : results[i-1];
+                    if( !node.walkNextChild(visitor, resultOfPrevChild, i) )
+                        break;
+                    results[i] = walk( children[i], visitor );
+            }   }
+            return node.leave( visitor, results );
+        }
+        return null;
+    }
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/Type.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/Type.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/Type.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/Type.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a type instance. A type instance wraps a <code>java.lang.Class</code>
+ * instance which has been supplied by the application. The following nodes
+ * have type instances as children:
+ * <LI><code>CandidateClass</code>
+ * <LI><code>CastExpression</code>
+ * <LI><code>Declaration</code>
+ * The result type of a type instance is the wrapped <code>java.lang.Class</code>
+ * instance. Type instances are not visible in query tree factory methods and
+ * expression factory methods. They are internally created by in implementation
+ * and are walked by a node visitor.
+ *
+ * @author Michael Watzek
+ */
+public interface Type extends Node
+{
+    /**
+     * Returns the string representation of the Java class,
+     * which is wrapped by this instance.
+     * @return the Java type name
+     */
+    public String getTypeName();
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a unary operator. All unary operators have exactly
+ * one children. Examples of binary operators
+ * are <code>ComplementExpression</code> and <code>NotExpression</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface UnaryExpression extends Expression
+{
+    /**
+     * Returns the node's expression.
+     * @return the node's expression
+     */
+    public Expression getExpression();
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryMinusExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryMinusExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryMinusExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryMinusExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a unary minus operator.
+ * The string representation of this operator is <code>-</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface UnaryMinusExpression extends UnaryExpression
+{
+}
+

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryPlusExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryPlusExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryPlusExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/UnaryPlusExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a unary plus operator.
+ * The string representation of this operator is <code>+</code>.
+ *
+ * @author Michael Watzek
+ */
+public interface UnaryPlusExpression extends UnaryExpression
+{
+}
+

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ValueTable.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ValueTable.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ValueTable.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/ValueTable.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * A ValueTable manages values for declared identifiers (such as variables 
+ * or parameters) of a query. It provides methods to declare an identifier, 
+ * to set and get its value and check a value to be compaitible with the 
+ * identifier's type.
+ *
+ * @author Michael Bouschen
+ */
+public interface ValueTable
+{
+    /**
+     * This method declares an identifier. The methods takes the name of the 
+     * declared identifier from the specified declaration node.
+     * @param decl the declaration node
+     */
+    public void declare(Declaration decl);
+
+    /**
+     * Sets the value of the specified identifier for later retrieval using 
+     * method {@link #getValue}). The identifier must be declared (see method 
+     * {@link #declare}) prior to a call of this method.
+     * @param name the name of the identifier
+     * @param value the new value of the identifier
+     */
+    public void setValue(String name, Object value);
+
+    
+    /**
+     * Returns the current value of the specified identifier. The identifier 
+     * must be declared using method {@link #declare}) and its value must be 
+     * set using method {@link #getValue}) prior to a call of this method.
+     * @param name the name of the identifier
+     * @return the current value of the identifier
+     */
+    public Object getValue(String name);
+
+    /**
+     * Checks whether the type of the specified value is compatible with the 
+     * type of the identifier.
+     * @return <code>true</code> if the type of the value is compatible with 
+     * the type of the identifier; <code>false</code> otherwise
+     */
+    public boolean isCompatibleValue(String name, Object value);
+}
+

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/VariableAccessExpression.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/VariableAccessExpression.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/VariableAccessExpression.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/VariableAccessExpression.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a variable access expression.
+ * It does not have any children.
+ *
+ * @author Michael Watzek
+ */
+public interface VariableAccessExpression extends IdentifierExpression
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/VariableDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/VariableDeclaration.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/VariableDeclaration.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/VariableDeclaration.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.jdoql.tree;
+
+/**
+ * This node represents a variable declaration.
+ * It does not have any children.
+ *
+ * @author Michael Watzek
+ */
+public interface VariableDeclaration extends Declaration
+{
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/package.html
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/package.html?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/package.html (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/jdoql/tree/package.html Fri Mar 18 17:02:29 2005
@@ -0,0 +1,26 @@
+<!--
+ Copyright 2005 The Apache Software Foundation.
+ 
+ Licensed 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.
+-->
+
+<html>
+<head>
+<title>Package org.apache.jdo.jdoql.tree</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+</head>
+
+<body bgcolor="#FFFFFF">
+<p>This package contains the query tree node interfaces, the node visitor interface and the tree walker.</p>
+</body>
+</html>

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/Bundle.properties
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/Bundle.properties?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/Bundle.properties (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/Bundle.properties Fri Mar 18 17:02:29 2005
@@ -0,0 +1,33 @@
+#
+# Copyright 2005 The Apache Software Foundation.
+# 
+# Licensed 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.
+
+# This file should conform to netbeans standards
+# (http://www.netbeans.org/i18n)
+
+# resource bundle for the messages
+# key consists of: <PREFIX_><description>
+# <PREFIX_> - any valid prefix like MSG_, EXC_, etc.
+# <description> - short description started with the upper case letter and used
+# upper case to represent each next word.
+
+# ResourceBundle properties file for model
+
+MSG_OffendingObject=OffendingObject:
+MSG_CauseThrowable=CauseThrowable:
+MSG_CauseThrowableStackTrace=CauseThrowableStackTrace:
+
+# General validation messages
+# Validation warning prefix (prepended to some of the messages below)
+MSG_ValidationWarning=Warning: 

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelException.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelException.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelException.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelException.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,190 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.model;
+
+import org.apache.jdo.util.I18NHelper;
+
+/**
+ * This exception indicates a Model problem. It is the root for all
+ * checked model exceptions.
+ *
+ * @author Michael Bouschen
+ * @since JDO 1.0.1
+ */
+public class ModelException 
+    extends Exception
+{
+    /** The throwable that caused this model exception to be thrown. */
+    private Throwable cause;
+    
+    /** Flag indicating whether printStackTrace is being executed. */
+    private boolean inPrintStackTrace = false;
+
+    /** I18N support */
+    private static I18NHelper msg = 
+        I18NHelper.getInstance(ModelException.class);
+
+    /**
+     * Creates new <code>ModelException</code> without detail message.
+     */
+    public ModelException() 
+    {
+    }
+    
+    /**
+     * Constructs a <code>ModelException</code> with the specified detail
+     * message.
+     * @param message the detail message.
+     */
+    public ModelException(String message)
+    {
+        super(message);
+    }
+
+    /** 
+     * Constructs a new <code>ModelException</code> with the specified 
+     * detail message and cause.
+     * @param message the detail message.
+     * @param cause the cause (which is saved for later retrieval by the
+     * {@link #getCause()} method). (A null value is permitted, and
+     * indicates that the cause is nonexistent or unknown.) 
+     */
+    public ModelException(String message, Throwable cause) 
+    {
+        super(message);
+        this.cause = cause;
+    }
+
+    /** 
+     * Returns the cause of this throwable or null if the cause is
+     * nonexistent or unknown. (The cause is the throwable that caused this 
+     * throwable to get thrown.) 
+     * @return the cause of this throwable or null if the cause is
+     * nonexistent or unknown. 
+     */
+    public synchronized Throwable getCause() 
+    {
+        // super.printStackTrace calls getCause to handle the cause. 
+        // Returning null prevents the superclass from handling the cause;
+        // instead the local implementation of printStackTrace should
+        // handle the cause. Otherwise, the cause is printed twice.
+        return inPrintStackTrace ? null : cause;
+    }
+
+    /**
+     * Initializes the cause of this throwable to the specified value. (The
+     * cause is the throwable that caused this throwable to get thrown.) 
+     * @param cause the cause (which is saved for later retrieval by the
+     * {@link #getCause()} method). (A null value is permitted, and
+     * indicates that the cause is nonexistent or unknown.)
+     * @return a reference to this <code>ModelException</code> instance.
+     */
+    public Throwable initCause(Throwable cause)
+    {
+        this.cause = cause;
+        return this;
+    }
+    
+	/**
+     * Returns the error message string of this throwable object.
+     * @return the error message string of this <code>ModelException</code>
+     * object if it was created with an error message string, the error 
+     * message of the cause if it was not created a message but the cause
+     * has a message, or <code>null</code> if neither has an error message. 
+     */
+	public String getMessage()
+	{
+		String message = super.getMessage();
+		if ((message == null) || (message.length() == 0)) {
+            // Get the message of the cause Throwable, if this
+            // ModelException does not have a message
+            if (cause != null)
+                message	= cause.getMessage();
+		}
+		return message;
+	}
+
+    /** 
+     * The <code>String</code> representation includes the name of the class,
+     * the descriptive comment (if any),
+     * and the <code>String</code> representation of the cause (if any).
+     * @return the <code>String</code>.
+     */
+    public synchronized String toString() 
+    {
+        StringBuffer sb = new StringBuffer();
+        sb.append(super.toString());
+        // Do not include cause information, if called by printStackTrace: 
+        // the stacktrace will include the cause anyway.
+        if ((cause != null) && !inPrintStackTrace) {
+            sb.append("\n");  //NOI18N
+            sb.append(msg.msg("MSG_CauseThrowable")); //NOI18N
+            sb.append("\n");  //NOI18N
+            sb.append(cause.toString()); //NOI18N
+        }
+        return sb.toString();
+    }
+  
+    /**
+     * Prints this <code>ModelException</code> and its backtrace to the 
+     * standard error output.
+     * Print cause Throwable's stack trace as well.
+     */
+    public void printStackTrace()
+    {
+        printStackTrace(System.err);
+    }
+
+    /**
+     * Prints this <code>ModelException</code> and its backtrace to the 
+     * specified print stream.
+     * Print cause Throwable's stack trace as well.
+     * @param s <code>PrintStream</code> to use for output
+     */
+    public synchronized void printStackTrace(java.io.PrintStream s) 
+    { 
+        synchronized (s) {
+            inPrintStackTrace = true;
+            super.printStackTrace(s);
+            if (cause != null) {
+                s.println(msg.msg("MSG_CauseThrowableStackTrace")); //NOI18N
+                cause.printStackTrace(s);
+            }
+            inPrintStackTrace = false;
+        }
+    }
+    
+    /**
+     * Prints this <code>ModelException</code> and its backtrace to the specified
+     * print writer.
+     * Print cause Throwable' stack trace as well.
+     * @param s <code>PrintWriter</code> to use for output
+     */
+    public synchronized void printStackTrace(java.io.PrintWriter s) 
+    { 
+        synchronized (s) {
+            inPrintStackTrace = true;
+            super.printStackTrace(s);
+            if (cause != null) {
+                s.println(msg.msg("MSG_CauseThrowableStackTrace")); //NOI18N
+                cause.printStackTrace(s);
+            }
+            inPrintStackTrace = false;
+        }
+    }
+    
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelFatalException.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelFatalException.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelFatalException.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelFatalException.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,191 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.model;
+
+import org.apache.jdo.util.I18NHelper;
+
+/**
+ * This exception indicates a fatal Model problem. Note this is an
+ * unchecked exception.
+ *
+ * @author Michael Bouschen
+ * @since JDO 1.0.1
+ */
+public class ModelFatalException 
+    extends RuntimeException
+{
+    /** The throwable that caused this model exception to be thrown. */
+    private Throwable cause;
+    
+    /** Flag indicating whether printStackTrace is being executed. */
+    private boolean inPrintStackTrace = false;
+
+    /** I18N support */
+    private static I18NHelper msg = 
+        I18NHelper.getInstance(ModelFatalException.class);
+
+    /**
+     * Creates new <code>ModelFatalException</code> without detail
+     * message. 
+     */
+    public ModelFatalException() 
+    {
+    }
+    
+    /**
+     * Constructs a <code>ModelFatalException</code> with the specified
+     * detail message.
+     * @param message the detail message.
+     */
+    public ModelFatalException(String message)
+    {
+        super(message);
+    }
+
+    /** 
+     * Constructs a new <code>ModelFatalException</code> with the specified 
+     * detail message and cause Exception.
+     * @param message the detail message.
+     * @param cause the cause (which is saved for later retrieval by the
+     * {@link #getCause()} method). (A null value is permitted, and
+     * indicates that the cause is nonexistent or unknown.) 
+     */
+    public ModelFatalException(String message, Throwable cause) 
+    {
+        super(message);
+        this.cause = cause;
+    }
+
+    /** 
+     * Returns the cause of this throwable or null if the cause is
+     * nonexistent or unknown. (The cause is the throwable that caused this 
+     * throwable to get thrown.) 
+     * @return the cause of this throwable or null if the cause is
+     * nonexistent or unknown. 
+     */
+    public Throwable getCause() 
+    {
+        // super.printStackTrace calls getCause to handle the cause. 
+        // Returning null prevents the superclass from handling the cause;
+        // instead the local implementation of printStackTrace should
+        // handle the cause. Otherwise, the cause is printed twice.
+        return inPrintStackTrace ? null : cause;
+    }
+
+    /**
+     * Initializes the cause of this throwable to the specified value. (The
+     * cause is the throwable that caused this throwable to get thrown.) 
+     * @param cause the cause (which is saved for later retrieval by the
+     * {@link #getCause()} method). (A null value is permitted, and
+     * indicates that the cause is nonexistent or unknown.)
+     * @return a reference to this <code>ModelFatalException</code> instance.
+     */
+    public Throwable initCause(Throwable cause)
+    {
+        this.cause = cause;
+        return this;
+    }
+    
+	/**
+     * Returns the error message string of this throwable object.
+     * @return the error message string of this <code>ModelException</code>
+     * object if it was created with an error message string, the error 
+     * message of the cause if it was not created a message but the cause
+     * has a message, or <code>null</code> if neither has an error message. 
+     */
+	public String getMessage()
+	{
+		String message = super.getMessage();
+		if ((message == null) || (message.length() == 0)) {
+            // Get the message of the cause Throwable, if this
+            // ModelException does not have a message
+            if (cause != null)
+                message	= cause.getMessage();
+		}
+		return message;
+	}
+
+    /** 
+     * The <code>String</code> representation includes the name of the class,
+     * the descriptive comment (if any),
+     * and the <code>String</code> representation of the cause (if any).
+     * @return the <code>String</code>.
+     */
+    public synchronized String toString() 
+    {
+        StringBuffer sb = new StringBuffer();
+        sb.append(super.toString());
+        // Do not include cause information, if called by printStackTrace: 
+        // the stacktrace will include the cause anyway.
+        if ((cause != null) && !inPrintStackTrace) {
+            sb.append("\n");  //NOI18N
+            sb.append(msg.msg("MSG_CauseThrowable")); //NOI18N
+            sb.append("\n");  //NOI18N
+            sb.append(cause.toString()); //NOI18N
+        }
+        return sb.toString();
+    }
+  
+    /**
+     * Prints this <code>ModelFatalException</code> and its backtrace to the 
+     * standard error output.
+     * Print cause Throwable's stack trace as well.
+     */
+    public void printStackTrace()
+    {
+        printStackTrace(System.err);
+    }
+
+    /**
+     * Prints this <code>ModelFatalException</code> and its backtrace to the 
+     * specified print stream.
+     * Print cause Throwable's stack trace as well.
+     * @param s <code>PrintStream</code> to use for output
+     */
+    public synchronized void printStackTrace(java.io.PrintStream s) 
+    { 
+        synchronized (s) {
+            inPrintStackTrace = true;
+            super.printStackTrace(s);
+            if (cause != null) {
+                s.println(msg.msg("MSG_CauseThrowableStackTrace")); //NOI18N
+                cause.printStackTrace(s);
+            }
+            inPrintStackTrace = false;
+        }
+    }
+    
+    /**
+     * Prints this <code>ModelFatalException</code> and its backtrace to the specified
+     * print writer.
+     * Print cause Throwable' stack trace as well.
+     * @param s <code>PrintWriter</code> to use for output
+     */
+    public void printStackTrace(java.io.PrintWriter s) 
+    { 
+        synchronized (s) {
+            inPrintStackTrace = true;
+            super.printStackTrace(s);
+            if (cause != null) {
+                s.println(msg.msg("MSG_CauseThrowableStackTrace")); //NOI18N
+                cause.printStackTrace(s);
+            }
+            inPrintStackTrace = false;
+        }
+    }
+    
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelValidationException.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelValidationException.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelValidationException.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelValidationException.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.model;
+
+import org.apache.jdo.util.I18NHelper;
+
+/**
+ * This exception indicates a problem during model validation.
+ *
+ * @author Michael Bouschen
+ * @since JDO 1.0.1
+ */
+public class ModelValidationException 
+    extends ModelException
+{
+	/** Constant representing an error. */
+	public static final int ERROR = 0;
+
+	/** Constant representing a warning. */
+	public static final int WARNING = 1;
+
+	/** 
+     * This field holds the type -- one of {@link #ERROR} or {@link #WARNING}
+	 */
+	private int type;
+
+	/** 
+     * This field holds the offending object -- the one being validated 
+	 * when the problem occurred
+	 */
+	private Object offendingObject;
+
+    /** I18N support */
+    private static I18NHelper msg = 
+        I18NHelper.getInstance(ModelValidationException.class);
+
+    /**
+     * Creates new <code>ModelValidationException</code> of type 
+     * {@link #ERROR} with <code>null</code> as the offending object and
+     * no detail message.
+     */
+    public ModelValidationException() 
+    {
+       this(ERROR, null, null); 
+    }
+    
+    /**
+     * Constructs a <code>ModelValidationException</code> of type 
+     * {@link #ERROR} with <code>null</code> as the offending object and
+     * with the specified detail message. 
+     * @param message the detail message.
+     */
+    public ModelValidationException(String message)
+    {
+        this(ERROR, null, message);
+    }
+
+	/**
+	 * Constructs a <code>ModelValidationException</code> of type 
+	 * {@link #ERROR} with the specified offending object and no 
+	 * detail message.
+	 * @param offendingObject the offending object.
+	 */
+	public ModelValidationException (Object offendingObject)
+	{
+		this(ERROR, offendingObject, null);
+	}
+
+	/**
+	 * Constructs a <code>ModelValidationException</code> of type 
+	 * {@link #ERROR} with the specified offending object and detail
+     * message .
+	 * @param offendingObject the offending object.
+	 * @param message the detail message.
+	 */
+	public ModelValidationException (Object offendingObject, String message)
+	{
+		this(ERROR, offendingObject, message);
+	}
+
+	/**
+	 * Constructs a <code>ModelValidationException</code> of the specified 
+	 * type with the specified detail message and offending object. 
+	 * @param errorType the type -- one of {@link #ERROR} or 
+     * {@link #WARNING}. 
+	 * @param offendingObject the offending object.
+	 * @param message the detail message.
+	 */
+	public ModelValidationException(int errorType, Object offendingObject,
+                                    String message)
+	{
+		super(message);
+		this.type = errorType;
+		this.offendingObject = offendingObject;
+	}
+
+	/**
+	 * Get the offending object -- the one being validated when the problem 
+	 * occurred.
+	 */
+	public Object getOffendingObject () 
+    { 
+        return offendingObject; 
+    }
+
+	/**
+	 * Get the type -- one of {@link #ERROR} or {@link #WARNING}.
+	 */
+	public int getType() 
+    { 
+        return type; 
+    }
+
+	/**
+	* Returns the error message string of this throwable object.
+	* @return the error message string of this 
+	* <code>ModelValidationException</code>, prepended with the warning string 
+	* if the type is {@link #WARNING}
+	*
+	*/
+	public String getMessage ()
+	{
+		String message = super.getMessage();
+		if ((WARNING == getType()) && 
+            (message != null) && (message.length() > 0)) {
+			message	= msg.msg("MSG_OffendingObject") + message; //NOI18N
+		}
+		return message;
+	}
+    /** 
+     * The <code>String</code> representation includes the name of the class,
+     * the descriptive comment (if any),
+     * and the <code>String</code> representation of the cause (if any).
+     * @return the <code>String</code>.
+     */
+    public String toString() 
+    {
+        StringBuffer sb = new StringBuffer();
+        sb.append(super.toString());
+        // include offending object information
+        if (offendingObject != null) {
+            sb.append("\n");  //NOI18N
+            sb.append(msg.msg("MSG_OffendingObject"));  //NOI18N
+            sb.append(offendingObject.toString());
+        }
+        return sb.toString();
+    }
+  
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelVetoException.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelVetoException.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelVetoException.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/ModelVetoException.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.model;
+
+/**
+ * This exception indicates a problem during model update.
+ *
+ * @author Michael Bouschen
+ * @since JDO 1.0.1
+ */
+public class ModelVetoException 
+    extends ModelException
+{
+    /**
+     * Creates new <code>ModelVetoException</code> without detail message.
+     */
+    public ModelVetoException() 
+    {
+    }
+    
+    /**
+     * Constructs a <code>ModelVetoException</code> with the specified
+     * detail message.
+     * @param msg the detail message.
+     */
+    public ModelVetoException(String msg)
+    {
+        super(msg);
+    }
+
+    /** 
+     * Constructs a new <code>ModelVetoException</code> with the specified
+     * detail message and cause.
+     * @param msg the detail message.
+     * @param cause the cause <code>Throwable</code>.
+     */
+    public ModelVetoException(String msg, Throwable cause) 
+    {
+        super(msg, cause);
+    }
+
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaField.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaField.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaField.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaField.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.model.java;
+
+import org.apache.jdo.model.jdo.JDOField;
+
+/**
+ * A JavaField instance represents a field declared by a class. It allows
+ * to get detailed information about the field such as name, modifiers,
+ * type, declaring class and the JDO meta data for the field (if
+ * available). 
+ * <p>
+ * Different environments (runtime, enhancer, development) will have
+ * different JavaType implementations to provide answers to the various
+ * methods. 
+ * 
+ * @author Michael Bouschen
+ * @since JDO 1.0.1
+ */
+public interface JavaField 
+{
+    /**
+     * Returns the name of the field. 
+     * @return field name
+     */
+    public String getName();
+
+    /**
+     * Returns the Java language modifiers for the field represented by
+     * this JavaField, as an integer. The java.lang.reflect.Modifier class
+     * should be used to decode the modifiers. 
+     * @return the Java language modifiers for this JavaField
+     * @see java.lang.reflect.Modifier
+     */
+    public int getModifiers();
+
+    /**
+     * Returns the JavaType representation of the field type.
+     * @return field type
+     */
+    public JavaType getType();
+
+    /**
+     * Returns the JavaType instance representing the class or interface
+     * that declares the field represented by this JavaField instance.
+     * @return the JavaType instance of the declaring class.
+     */
+    public JavaType getDeclaringClass();    
+
+    /**
+     * Returns the corresponding JDOField instance, if the JDOModel
+     * provides any JDO metadata for the field represented by this
+     * JavaField. If there is no corresponding JDOField representation, the
+     * method returns <code>null</code>. 
+     * <p>
+     * A <code>null</code> result means the declaring class is not
+     * persistence capable or the field represented by this JavaField is
+     * not managed. Note, a non-<code>null</code> result does not
+     * necessarily mean the field is managed. The JDO metadata might define
+     * the persistence-modifier of this field as <code>none</code>. Then
+     * the JDOModel provides a JDOField instance which is returned by this
+     * method. You can call method  
+     * {@link org.apache.jdo.model.jdo.JDOField#isManaged()} on a 
+     * non-<code>null</code> result to verify that this JavaField
+     * represents a managed field. 
+     * @return the corresponding JDOField instance (if available);
+     * <code>null</code> otherwise.
+     */
+    public JDOField getJDOField();
+
+}

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaModel-API.jpg
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaModel-API.jpg?view=auto&rev=158176
==============================================================================
Binary file - no diff available.

Propchange: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaModel-API.jpg
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaModel-API.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaModel.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaModel.java?view=auto&rev=158176
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaModel.java (added)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/model/java/JavaModel.java Fri Mar 18 17:02:29 2005
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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 org.apache.jdo.model.java;
+
+import java.io.InputStream;
+
+import org.apache.jdo.model.ModelException;
+import org.apache.jdo.model.jdo.JDOModel;
+
+
+/** 
+ * A JavaModel instance bundles a number of JavaType instances and provides
+ * methods to retrieve JavaType instance by their name. A type name must be
+ * unique must be unique within a JavaModel instance. If the JavaType
+ * represents a class or an interface its type name is the fully qualified
+ * name. The model supports multiple classes or interfaces having the same
+ * fully qualified name by different JavaModel instances. 
+ *
+ * @author Michael Bouschen
+ * @since JDO 1.0.1
+ */
+public interface JavaModel
+{
+    /** 
+     * The method returns the JavaType instance for the specified type
+     * name. A type name is unique within one JavaModel instance. The
+     * method returns <code>null</code> if this model instance does not
+     * know a type with the specified name.
+     * @param name the name of the type
+     * @return a JavaType instance for the specified name or
+     * <code>null</code> if not present in this model instance.
+     */
+    public JavaType getJavaType(String name);
+
+    /** 
+     * The method returns the JavaType instance for the type name of the
+     * specified class object. This is a convenience method for 
+     * <code>getJavaType(clazz.getName())</code>. The major difference
+     * between this method and getJavaType taking a type name is that this 
+     * method is supposed to return a non-<code>null<code> value. The
+     * specified class object describes an existing type.
+     * @param clazz the Class instance representing the type
+     * @return a JavaType instance for the name of the specified class
+     * object.
+     */
+    public JavaType getJavaType(Class clazz);
+
+    /**
+     * Finds a resource with a given name. A resource is some data that can
+     * be accessed by class code in a way that is independent of the
+     * location of the code. The name of a resource is a "/"-separated path
+     * name that identifies the resource. The method method opens the
+     * resource for reading and returns an InputStream. It returns 
+     * <code>null</code> if no resource with this name is found or if the 
+     * caller doesn't have adequate privileges to get the resource.
+     * @param resourceName the resource name
+     * @return an input stream for reading the resource, or <code>null</code> 
+     * if the resource could not be found or if the caller doesn't have
+     * adequate privileges to get the resource. 
+     */
+    public InputStream getInputStreamForResource(String resourceName);
+
+    /**
+     * Returns the parent JavaModel instance of this JavaModel.
+     * @return the parent JavaModel
+     */
+    public JavaModel getParent();
+
+    /**
+     * Set the parent JavaModel for this JavaModel. The method
+     * automatically adds this JavaModel to the collection of children
+     * of the specified parent JavaModel.
+     * @param parent the parent JavaModel
+     * @exception ModelException if impossible
+     */
+    public void setParent(JavaModel parent)
+        throws ModelException;
+
+    /**
+     * Returns a collection of child JavaModel instances in the form
+     * of an array. All instances from the returned array have this
+     * JavaModel instance as parent.
+     * @return the child JavaModel instances
+     */
+    public JavaModel[] getChildren();
+
+    /**
+     * Returns the corresponding JDOModel instance.
+     * @return the corresponding JDOModel.
+     */
+    public JDOModel getJDOModel();
+
+    /**
+     * Sets the corresponding JDOModel instance. 
+     * @param jdoModel the JDOModel instance
+     * @exception ModelException if impossible
+     */
+    public void setJDOModel(JDOModel jdoModel)
+        throws ModelException;
+
+}



Mime
View raw message