Author: aadamchik
Date: Sat Apr 29 14:55:11 2006
New Revision: 398245

URL: http://svn.apache.org/viewcvs?rev=398245&view=rev
Log:
checking JPA example that uses annotated classes and doesn't need an XML mapping
current version can connect to db and execute SQLTemplates. Working on support 
for other stuff

Added:
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.classpath
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.project
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.core.prefs
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.ui.prefs
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/pom.xml
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/Main.java
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Department.java
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Person.java
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Project.java
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Queries.java
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/resources/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/resources/META-INF/
    
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/resources/META-INF/persistence.xml
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/test/
Modified:
    incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/   (props 
changed)

Propchange: incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Apr 29 14:55:11 2006
@@ -0,0 +1 @@
+target

Added: incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.classpath
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.classpath?rev=398245&view=auto
==============================================================================
--- incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.classpath 
(added)
+++ incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.classpath Sat 
Apr 29 14:55:11 2006
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="src" path="src/main/resources"/>
+       <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" 
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.project
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.project?rev=398245&view=auto
==============================================================================
--- incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.project (added)
+++ incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.project Sat 
Apr 29 14:55:11 2006
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>cayenne-jpa-annotations-example</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.maven.ide.eclipse.maven2Builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.maven.ide.eclipse.maven2Nature</nature>
+       </natures>
+</projectDescription>

Added: 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.core.prefs
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.core.prefs?rev=398245&view=auto
==============================================================================
--- 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.core.prefs
 (added)
+++ 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.core.prefs
 Sat Apr 29 14:55:11 2006
@@ -0,0 +1,298 @@
+#Sat Apr 29 10:10:52 EDT 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=48
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=48
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=48
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=48
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=48
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines=true
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not 
insert
+org.eclipse.jdt.core.formatter.comment.line_length=90
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do 
not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do 
not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do 
not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not 
insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do
 not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do
 not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=90
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false

Added: 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.ui.prefs
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.ui.prefs?rev=398245&view=auto
==============================================================================
--- 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.ui.prefs
 (added)
+++ 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/.settings/org.eclipse.jdt.ui.prefs
 Sat Apr 29 14:55:11 2006
@@ -0,0 +1,8 @@
+#Sat Apr 29 10:10:53 EDT 2006
+eclipse.preferences.version=1
+formatter_settings_version=8
+internal.default.compliance=default
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" 
encoding\="UTF-8"?><templates><template autoinsert\="true" 
context\="gettercomment_context" deleted\="false" description\="Comment for 
getter method" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" 
name\="gettercomment"></template><template autoinsert\="true" 
context\="settercomment_context" deleted\="false" description\="Comment for 
setter method" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" 
name\="settercomment"></template><template autoinsert\="true" 
context\="constructorcomment_context" deleted\="false" description\="Comment 
for created constructors" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" 
name\="constructorcomment"></template><template autoinsert\="true" 
context\="filecomment_context" deleted\="false" description\="Comment for 
created Java files" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.filecom
 ment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" 
context\="typecomment_context" deleted\="false" description\="Comment for 
created types" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" 
name\="typecomment">/**\n * @author \n */</template><template 
autoinsert\="true" context\="fieldcomment_context" deleted\="false" 
description\="Comment for fields" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" 
name\="fieldcomment"></template><template autoinsert\="true" 
context\="methodcomment_context" deleted\="false" description\="Comment for 
non-overriding methods" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" 
name\="methodcomment"></template><template autoinsert\="true" 
context\="overridecomment_context" deleted\="false" description\="Comment for 
overriding methods" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" 
name\="overridecomment"></template><templ
 ate autoinsert\="false" context\="newtype_context" deleted\="false" 
description\="Newly created files" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\n *  
Copyright 2006 The Apache Software Foundation\n *\n *  Licensed under the 
Apache License, Version 2.0 (the "License");\n *  you may not use this file 
except in compliance with the License.\n *  You may obtain a copy of the 
License at\n *\n *      http\://www.apache.org/licenses/LICENSE-2.0\n *\n *  
Unless required by applicable law or agreed to in writing, software\n *  
distributed under the License is distributed on an "AS IS" BASIS,\n *  WITHOUT 
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *  See the 
License for the specific language governing permissions and\n *  limitations 
under the License.\n 
*/\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template
 autoinsert\="true" context\="catchblock_context" deleted\="false" 
description\="
 Code in new catch blocks" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" 
name\="catchblock">${exception_var}.printStackTrace();</template><template 
autoinsert\="true" context\="methodbody_context" deleted\="false" 
description\="Code in created method stubs" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" 
name\="methodbody">${body_statement}</template><template autoinsert\="true" 
context\="constructorbody_context" deleted\="false" description\="Code in 
created constructor stubs" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" 
name\="constructorbody">${body_statement}</template><template 
autoinsert\="true" context\="getterbody_context" deleted\="false" 
description\="Code in created getters" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" 
name\="getterbody">return ${field};</template><template autoinsert\="true" 
context\="setterbody_context" deleted\="false" description\="Code in c
 reated setters" enabled\="true" 
id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" 
name\="setterbody">${field} \= ${param};</template></templates>

Added: incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/pom.xml
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/pom.xml?rev=398245&view=auto
==============================================================================
--- incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/pom.xml (added)
+++ incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/pom.xml Sat Apr 
29 14:55:11 2006
@@ -0,0 +1,51 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.apache.cayenne</groupId>
+       <artifactId>cayenne-jpa-annotations-example</artifactId>
+       <packaging>jar</packaging>
+       <version>3.0-incubating-SNAPSHOT</version>
+       <name>An example application using JPA annotations.</name>
+       <url>http://incubator.apache.org/cayenne</url>
+       <dependencies>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>3.8.1</version>
+                       <scope>test</scope>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.geronimo.specs</groupId>
+                       <artifactId>geronimo-jpa_3.0_spec</artifactId>
+                       <version>1.0-SNAPSHOT</version>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.cayenne</groupId>
+                       <artifactId>cayenne-jpa</artifactId>
+                       <version>3.0-incubating-SNAPSHOT</version>
+                       <scope>runtime</scope>
+               </dependency>
+               
+               <dependency>
+                       <groupId>postgresql</groupId>
+                       <artifactId>postgresql</artifactId>
+                       <version>8.0-312.jdbc3</version>
+                       <scope>runtime</scope>
+               </dependency>
+       </dependencies>
+       
+       <build>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <configuration>
+                                       <source>1.5</source>
+                                       <target>1.5</target>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+</project>

Added: 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/Main.java
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/Main.java?rev=398245&view=auto
==============================================================================
--- 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/Main.java
 (added)
+++ 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/Main.java
 Sat Apr 29 14:55:11 2006
@@ -0,0 +1,132 @@
+/*
+ *  Copyright 2006 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.cayenne.jpa.example;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Persistence;
+import javax.persistence.Query;
+
+import org.apache.cayenne.jpa.example.entity.Department;
+import org.apache.cayenne.jpa.example.entity.Person;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * An example main class.
+ * 
+ * @author Andrus Adamchik
+ */
+public class Main {
+
+    EntityManager entityManager;
+    Log logger;
+
+    public static void main(String[] args) {
+        try {
+            new Main().execute();
+        }
+        catch (Throwable th) {
+            th.printStackTrace();
+        }
+    }
+
+    Main() {
+        this.entityManager = Persistence
+                .createEntityManagerFactory("HRPersistenceUnit")
+                .createEntityManager();
+        this.logger = LogFactory.getLog("3t-client-demo");
+    }
+
+    void execute() {
+
+        logger.info("*** 1. Setup data: ");
+
+        // batch a few queries in a single call...
+
+        Query delete1 = entityManager.createNamedQuery("DeletePerson");
+        logger.info("   deleted = " + delete1.executeUpdate());
+
+        Query delete2 = entityManager.createNamedQuery("DeleteDepartment");
+        logger.info("   deleted = " + delete2.executeUpdate());
+
+        Query insert1 = entityManager.createNamedQuery("CreateData");
+        logger.info("   inserted = " + insert1.executeUpdate());
+
+        logger.info("=======================================\n\n ");
+        logger.info("*** 2. Select: ");
+
+        Query select1 = entityManager.createNamedQuery("DepartmentWithName");
+        List results = select1.getResultList();
+        logger.info("   select results: " + results);
+
+        Department department = (Department) results.get(0);
+        department.setDescription(department.getDescription() + "_");
+
+        logger.info("=======================================\n\n ");
+        logger.info("*** 3. Commit modified: ");
+        entityManager.flush();
+
+        logger.info("   department: " + department);
+
+        logger.info("=======================================\n\n ");
+        logger.info("*** 4. Commit New Object: ");
+        Person person = new Person();
+        person.setBaseSalary(new Double(23000.00));
+        person.setDateHired(new Date());
+        person.setFullName("Test Person");
+
+        entityManager.persist(person);
+
+        entityManager.flush();
+
+        logger.info("   person: " + person);
+
+        logger.info("=======================================\n\n ");
+        logger.info("*** 5. Setup relationship: ");
+
+        person.setDepartment(department);
+
+        Person anotherPerson = new Person();
+        anotherPerson.setBaseSalary(new Double(88000.00));
+        anotherPerson.setDateHired(new Date());
+        anotherPerson.setFullName("Another Test Person");
+        entityManager.persist(anotherPerson);
+
+        department.getEmployees().add(anotherPerson);
+
+        entityManager.flush();
+
+        Person yetAnotherPerson = new Person();
+        yetAnotherPerson.setBaseSalary(new Double(1000000.00));
+        yetAnotherPerson.setDateHired(new Date());
+        yetAnotherPerson.setFullName("Yet Another Test Person");
+        entityManager.persist(yetAnotherPerson);
+        department.getEmployees().add(yetAnotherPerson);
+
+        entityManager.flush();
+
+        logger.info("=======================================\n\n ");
+        logger.info("*** 6. Delete relationship: ");
+
+        department.getEmployees().remove(anotherPerson);
+        yetAnotherPerson.setDepartment(null);
+        entityManager.flush();
+        logger.info(" employees: " + department.getEmployees());
+    }
+}
\ No newline at end of file

Added: 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Department.java
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Department.java?rev=398245&view=auto
==============================================================================
--- 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Department.java
 (added)
+++ 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Department.java
 Sat Apr 29 14:55:11 2006
@@ -0,0 +1,60 @@
+/*
+ *  Copyright 2006 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.cayenne.jpa.example.entity;
+
+import java.util.List;
+
+import javax.persistence.Entity;
+import javax.persistence.NamedQuery;
+import javax.persistence.QueryHint;
+
+import org.apache.cayenne.jpa.bridge.QueryHints;
+
[EMAIL PROTECTED]
[EMAIL PROTECTED](name = "DepartmentWithName", query = "delete from 
department", hints = {
+    @QueryHint(name = QueryHints.QUERY_TYPE_HINT, value = 
QueryHints.SELECT_QUERY)
+})
+public class Department {
+
+    protected String name;
+    protected String description;
+    protected List<Person> employees;
+    protected List<Project> projects;
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<Person> getEmployees() {
+        return employees;
+    }
+
+    public List<Project> getProjects() {
+        return projects;
+    }
+}

Added: 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Person.java
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Person.java?rev=398245&view=auto
==============================================================================
--- 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Person.java
 (added)
+++ 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Person.java
 Sat Apr 29 14:55:11 2006
@@ -0,0 +1,72 @@
+/*
+ *  Copyright 2006 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.cayenne.jpa.example.entity;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.Entity;
+
[EMAIL PROTECTED]
+public class Person {
+
+    protected double baseSalary;
+    protected Date dateHired;
+    protected String fullName;
+    protected Department department;
+    protected List<Project> managedProjects;
+    protected List<Project> projects;
+
+    public double getBaseSalary() {
+        return baseSalary;
+    }
+
+    public void setBaseSalary(double baseSalary) {
+        this.baseSalary = baseSalary;
+    }
+
+    public Date getDateHired() {
+        return dateHired;
+    }
+
+    public void setDateHired(Date dateHired) {
+        this.dateHired = dateHired;
+    }
+
+    public Department getDepartment() {
+        return department;
+    }
+
+    public void setDepartment(Department department) {
+        this.department = department;
+    }
+
+    public String getFullName() {
+        return fullName;
+    }
+
+    public void setFullName(String fullName) {
+        this.fullName = fullName;
+    }
+
+    public List<Project> getManagedProjects() {
+        return managedProjects;
+    }
+
+    public List<Project> getProjects() {
+        return projects;
+    }
+}

Added: 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Project.java
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Project.java?rev=398245&view=auto
==============================================================================
--- 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Project.java
 (added)
+++ 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Project.java
 Sat Apr 29 14:55:11 2006
@@ -0,0 +1,54 @@
+/*
+ *  Copyright 2006 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.cayenne.jpa.example.entity;
+
+import java.util.List;
+
+public class Project {
+
+    protected String name;
+    protected Department department;
+    protected Person manager;
+    protected List<Person> members;
+
+    public Department getDepartment() {
+        return department;
+    }
+
+    public void setDepartment(Department department) {
+        this.department = department;
+    }
+
+    public Person getManager() {
+        return manager;
+    }
+
+    public void setManager(Person manager) {
+        this.manager = manager;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<Person> getMembers() {
+        return members;
+    }
+}

Added: 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Queries.java
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Queries.java?rev=398245&view=auto
==============================================================================
--- 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Queries.java
 (added)
+++ 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/java/org/apache/cayenne/jpa/example/entity/Queries.java
 Sat Apr 29 14:55:11 2006
@@ -0,0 +1,38 @@
+/*
+ *  Copyright 2006 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.cayenne.jpa.example.entity;
+
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.QueryHint;
+
+import org.apache.cayenne.jpa.bridge.QueryHints;
+
[EMAIL PROTECTED](value = {
+        @NamedQuery(name = "CreateData", query = "insert into department 
(department_id, name, description) "
+                + "values (1, 'IT', 'Information Technology Department')", 
hints = {
+            @QueryHint(name = QueryHints.QUERY_TYPE_HINT, value = 
QueryHints.SQL_TEMPLATE_QUERY)
+        }),
+        @NamedQuery(name = "DeletePerson", query = "delete from person", hints 
= {
+            @QueryHint(name = QueryHints.QUERY_TYPE_HINT, value = 
QueryHints.SQL_TEMPLATE_QUERY)
+        }),
+        @NamedQuery(name = "DeleteDepartment", query = "delete from 
department", hints = {
+            @QueryHint(name = QueryHints.QUERY_TYPE_HINT, value = 
QueryHints.SQL_TEMPLATE_QUERY)
+        })
+})
+public class Queries {
+
+}

Added: 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/resources/META-INF/persistence.xml
URL: 
http://svn.apache.org/viewcvs/incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/resources/META-INF/persistence.xml?rev=398245&view=auto
==============================================================================
--- 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/resources/META-INF/persistence.xml
 (added)
+++ 
incubator/cayenne/jpa/trunk/cayenne-jpa-annotations-example/src/main/resources/META-INF/persistence.xml
 Sat Apr 29 14:55:11 2006
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence>
+       <persistence-unit name="HRPersistenceUnit">
+               <description>An HR example persistence unit</description>
+               <non-jta-data-source>ds1</non-jta-data-source>
+               <class>org.apache.cayenne.jpa.example.entity.Department</class>
+               <class>org.apache.cayenne.jpa.example.entity.Person</class>
+               <class>org.apache.cayenne.jpa.example.entity.Project</class>
+               
+               <!-- 
+                       a class that stores named query annotations that 
+                       are not bound to entities 
+               -->
+               <class>org.apache.cayenne.jpa.example.entity.Queries</class>
+               
+               <properties>
+                       <property name="CayenneDataSource.ds1.jdbc.driver" 
value="org.postgresql.Driver"/>
+                       <property name="CayenneDataSource.ds1.jdbc.url" 
value="jdbc:postgresql://localhost:5432/hr"/>
+                       <property name="CayenneDataSource.ds1.jdbc.username" 
value="andrus"/>
+                       <property name="CayenneDataSource.ds1.jdbc.password" 
value="andrus"/>
+                       <property 
name="CayenneDataSource.ds1.jdbc.minConnections" value="1"/>
+                       <property 
name="CayenneDataSource.ds1.jdbc.maxConnections" value="2"/>
+               </properties>
+       </persistence-unit>
+</persistence>
\ No newline at end of file


Reply via email to