├── hibernate-core └── src │ ├── test │ ├── resources │ │ ├── spy.properties │ │ ├── DB2JccConfiguration.properties │ │ ├── org │ │ │ └── hibernate │ │ │ │ ├── test │ │ │ │ ├── fileimport │ │ │ │ │ ├── dogs.sql │ │ │ │ │ ├── humans.sql │ │ │ │ │ └── Dog.hbm.xml │ │ │ │ └── annotations │ │ │ │ │ ├── configuration │ │ │ │ │ └── orm.xml │ │ │ │ │ └── bytecode │ │ │ │ │ └── Hammer.hbm.xml │ │ │ │ └── metamodel │ │ │ │ └── source │ │ │ │ └── annotations │ │ │ │ └── xml │ │ │ │ └── mocker │ │ │ │ ├── default-schema2.xml │ │ │ │ └── entity-metadata-complete.xml │ │ └── hibernate.cfg.xml │ └── java │ │ └── org │ │ └── hibernate │ │ ├── test │ │ ├── mapping │ │ │ └── usertypes │ │ │ │ ├── TestEnum.java │ │ │ │ ├── TestEnumType.hbm.xml │ │ │ │ └── TestEntity.java │ │ ├── propertyref │ │ │ ├── import.sql │ │ │ └── inheritence │ │ │ │ └── union │ │ │ │ └── Customer.java │ │ ├── stats │ │ │ ├── State.java │ │ │ └── Province.java │ │ ├── mappingexception │ │ │ ├── InvalidMapping.java │ │ │ ├── InvalidMapping.hbm.xml │ │ │ └── User.hbm.xml │ │ ├── onetoone │ │ │ ├── optional │ │ │ │ ├── Org.java │ │ │ │ ├── Entity.java │ │ │ │ ├── Person.java │ │ │ │ └── Address.java │ │ │ ├── joined │ │ │ │ ├── Org.java │ │ │ │ ├── Entity.java │ │ │ │ ├── Person.java │ │ │ │ └── Address.java │ │ │ └── singletable │ │ │ │ ├── Entity.java │ │ │ │ ├── Person.java │ │ │ │ ├── Org.java │ │ │ │ └── Address.java │ │ ├── annotations │ │ │ ├── any │ │ │ │ └── Property.java │ │ │ ├── entity │ │ │ │ ├── Starred.java │ │ │ │ ├── Length.java │ │ │ │ └── CommunityBid.java │ │ │ ├── polymorphism │ │ │ │ ├── MovingThing.java │ │ │ │ └── SportCar.java │ │ │ ├── id │ │ │ │ ├── entities │ │ │ │ │ ├── Planet.java │ │ │ │ │ ├── FirTree.java │ │ │ │ │ ├── GoalKeeper.java │ │ │ │ │ ├── Tower.java │ │ │ │ │ └── MilitaryBuilding.java │ │ │ │ ├── sequences │ │ │ │ │ └── entities │ │ │ │ │ │ ├── Planet.java │ │ │ │ │ │ └── FirTree.java │ │ │ │ └── package-info.java │ │ │ ├── generics │ │ │ │ ├── State.java │ │ │ │ ├── Paper.java │ │ │ │ ├── PricedStuff.java │ │ │ │ └── Stuff.java │ │ │ ├── collectionelement │ │ │ │ ├── FavoriteFood.java │ │ │ │ ├── Character.java │ │ │ │ └── indexedCollection │ │ │ │ │ └── Contact.java │ │ │ ├── configuration │ │ │ │ └── package-info.java │ │ │ ├── manytoone │ │ │ │ ├── referencedcolumnname │ │ │ │ │ ├── Vendor.java │ │ │ │ │ └── Item.java │ │ │ │ └── Customer.java │ │ │ ├── A320b.java │ │ │ ├── reflection │ │ │ │ ├── Availability.java │ │ │ │ ├── Competition.java │ │ │ │ ├── SocialSecurityPhysicalAccount.java │ │ │ │ └── Organization.java │ │ │ ├── entitynonentity │ │ │ │ ├── Cellular.java │ │ │ │ ├── Communication.java │ │ │ │ ├── GSM.java │ │ │ │ ├── Phone.java │ │ │ │ └── Interaction.java │ │ │ ├── genericsinheritance │ │ │ │ ├── ChildHierarchy1.java │ │ │ │ ├── ParentHierarchy1.java │ │ │ │ ├── ChildHierarchy22.java │ │ │ │ ├── ParentHierarchy22.java │ │ │ │ ├── ChildHierarchy2.java │ │ │ │ └── ParentHierarchy2.java │ │ │ ├── inheritance │ │ │ │ ├── Apple.java │ │ │ │ ├── joined │ │ │ │ │ ├── SwimmingPool.java │ │ │ │ │ ├── PropertyAsset.java │ │ │ │ │ └── FinancialAsset.java │ │ │ │ └── singletable │ │ │ │ │ ├── PaperTrash.java │ │ │ │ │ ├── Noise.java │ │ │ │ │ ├── Rock.java │ │ │ │ │ └── House.java │ │ │ ├── interfaces │ │ │ │ ├── Contact.java │ │ │ │ └── User.java │ │ │ ├── xml │ │ │ │ └── hbm │ │ │ │ │ ├── B.java │ │ │ │ │ ├── A.java │ │ │ │ │ └── Z.java │ │ │ ├── cid │ │ │ │ ├── Product.java │ │ │ │ ├── Presenter.java │ │ │ │ ├── Channel.java │ │ │ │ ├── OrderLine.java │ │ │ │ ├── Order.java │ │ │ │ ├── B.java │ │ │ │ ├── C.java │ │ │ │ └── A.java │ │ │ ├── bytecode │ │ │ │ ├── Tool.java │ │ │ │ └── Hammer.java │ │ │ ├── fkcircularity │ │ │ │ ├── C.java │ │ │ │ ├── A.java │ │ │ │ ├── ClassB.java │ │ │ │ ├── ClassC.java │ │ │ │ ├── ClassD.java │ │ │ │ └── D.java │ │ │ ├── derivedidentities │ │ │ │ ├── e2 │ │ │ │ │ ├── b │ │ │ │ │ │ ├── EmployeeId.java │ │ │ │ │ │ ├── DependentId.java │ │ │ │ │ │ └── Employee.java │ │ │ │ │ └── a │ │ │ │ │ │ ├── EmployeeId.java │ │ │ │ │ │ ├── Employee.java │ │ │ │ │ │ └── DependentId.java │ │ │ │ ├── e5 │ │ │ │ │ ├── b │ │ │ │ │ │ ├── PersonId.java │ │ │ │ │ │ └── Person.java │ │ │ │ │ ├── c │ │ │ │ │ │ └── Person.java │ │ │ │ │ └── a │ │ │ │ │ │ └── PersonId.java │ │ │ │ ├── e3 │ │ │ │ │ ├── a │ │ │ │ │ │ ├── EmployeeId.java │ │ │ │ │ │ ├── Employee.java │ │ │ │ │ │ └── DependentId.java │ │ │ │ │ └── b │ │ │ │ │ │ ├── Employee.java │ │ │ │ │ │ ├── DependentId.java │ │ │ │ │ │ └── EmployeeId.java │ │ │ │ ├── e6 │ │ │ │ │ ├── b │ │ │ │ │ │ ├── Person.java │ │ │ │ │ │ └── PersonId.java │ │ │ │ │ └── a │ │ │ │ │ │ ├── Person.java │ │ │ │ │ │ └── PersonId.java │ │ │ │ ├── e1 │ │ │ │ │ ├── b │ │ │ │ │ │ ├── Employee.java │ │ │ │ │ │ └── DependentId.java │ │ │ │ │ └── c │ │ │ │ │ │ └── Employee.java │ │ │ │ └── e4 │ │ │ │ │ ├── a │ │ │ │ │ ├── Simple.java │ │ │ │ │ └── Person.java │ │ │ │ │ └── b │ │ │ │ │ └── Person.java │ │ │ ├── access │ │ │ │ ├── BigBed.java │ │ │ │ ├── Thingy.java │ │ │ │ └── Chair.java │ │ │ ├── idmanytoone │ │ │ │ └── alphabetical │ │ │ │ │ ├── Service.java │ │ │ │ │ ├── Benefserv.java │ │ │ │ │ ├── Droitacces.java │ │ │ │ │ └── Acces.java │ │ │ ├── lob │ │ │ │ ├── Dog.java │ │ │ │ └── Editor.java │ │ │ ├── query │ │ │ │ └── SynonymousDictionary.java │ │ │ ├── embedded │ │ │ │ └── URLFavorite.java │ │ │ ├── override │ │ │ │ ├── PropertyInfo.java │ │ │ │ └── Location.java │ │ │ ├── namingstrategy │ │ │ │ └── DummyNamingStrategy.java │ │ │ ├── tuplizer │ │ │ │ └── Country.java │ │ │ ├── indexcoll │ │ │ │ ├── Gas.java │ │ │ │ └── GasKey.java │ │ │ ├── Ferry.java │ │ │ ├── IncorrectEntity.java │ │ │ ├── Thing.java │ │ │ ├── onetoone │ │ │ │ ├── TrousersZip.java │ │ │ │ ├── Heart.java │ │ │ │ ├── PartyAffiliate.java │ │ │ │ └── Trousers.java │ │ │ ├── tableperclass │ │ │ │ ├── Robot.java │ │ │ │ ├── T800.java │ │ │ │ └── Product.java │ │ │ ├── duplicatedgenerator │ │ │ │ └── Flight.java │ │ │ └── referencedcolumnname │ │ │ │ ├── Item.java │ │ │ │ └── Vendor.java │ │ ├── criteria │ │ │ ├── Man.java │ │ │ ├── Woman.java │ │ │ ├── Code.java │ │ │ ├── VersionedRecord.java │ │ │ ├── Animal.hbm.xml │ │ │ ├── Role.java │ │ │ ├── TestObject.hbm.xml │ │ │ └── StudentDTO.java │ │ ├── legacy │ │ │ ├── TrivialClass.java │ │ │ ├── Trivial.java │ │ │ ├── Named.java │ │ │ ├── Multiplicity.java │ │ │ ├── Super.java │ │ │ ├── AbstractProxy.java │ │ │ ├── K.java │ │ │ ├── J.java │ │ │ ├── Nameable.java │ │ │ ├── StringComparator.java │ │ │ ├── Down.java │ │ │ ├── Drug.java │ │ │ └── NestingComponent.java │ │ ├── jpa │ │ │ ├── package.html │ │ │ ├── MySubclassEntity.java │ │ │ └── cascade │ │ │ │ └── Other.java │ │ ├── hql │ │ │ ├── Cat.java │ │ │ ├── Dog.java │ │ │ ├── Lizard.java │ │ │ ├── PettingZoo.java │ │ │ ├── SUV.java │ │ │ ├── Car.java │ │ │ ├── Truck.java │ │ │ ├── Pickup.java │ │ │ ├── DomesticAnimal.java │ │ │ ├── Reptile.java │ │ │ └── CompositeIdEntity.hbm.xml │ │ ├── any │ │ │ └── PropertyValue.java │ │ ├── mixed │ │ │ └── Folder.java │ │ ├── entityname │ │ │ └── Car.java │ │ ├── stateless │ │ │ ├── Country.java │ │ │ └── Org.java │ │ ├── instrument │ │ │ └── cases │ │ │ │ └── Executable.java │ │ ├── util │ │ │ └── dtd │ │ │ │ └── child.xml │ │ ├── ondelete │ │ │ ├── Address.java │ │ │ └── Salesperson.java │ │ ├── discriminator │ │ │ └── Address.java │ │ ├── dynamicentity │ │ │ ├── Customer.java │ │ │ └── Company.java │ │ ├── joinedsubclass │ │ │ └── Address.java │ │ ├── unionsubclass2 │ │ │ └── Address.java │ │ ├── id │ │ │ ├── Product.java │ │ │ └── Product.hbm.xml │ │ ├── array │ │ │ └── B.java │ │ ├── cut │ │ │ └── types.hbm.xml │ │ ├── event │ │ │ └── collection │ │ │ │ └── Entity.java │ │ ├── typeparameters │ │ │ └── Typedef.hbm.xml │ │ ├── cfg │ │ │ ├── cache │ │ │ │ ├── SubClass.java │ │ │ │ ├── Item.java │ │ │ │ └── BaseClass.java │ │ │ ├── persister │ │ │ │ ├── Tree.java │ │ │ │ └── Palmtree.java │ │ │ └── orm-serializable.xml │ │ ├── joinfetch │ │ │ └── Category.java │ │ ├── idclass │ │ │ └── FavoriteCustomer.java │ │ ├── unionsubclass │ │ │ └── Employee.java │ │ ├── interfaceproxy │ │ │ ├── Folder.java │ │ │ └── Item.java │ │ ├── iterate │ │ │ ├── Item.java │ │ │ └── Item.hbm.xml │ │ ├── abstractembeddedcomponents │ │ │ ├── propertyref │ │ │ │ ├── Address.java │ │ │ │ └── Server.java │ │ │ └── cid │ │ │ │ └── MyInterface.java │ │ ├── hqlfetchscroll │ │ │ └── Child.java │ │ ├── tm │ │ │ └── Item.hbm.xml │ │ ├── idbag │ │ │ └── Group.java │ │ ├── fileimport │ │ │ └── Dog.java │ │ └── readonly │ │ │ └── StudentDTO.java │ │ └── metamodel │ │ ├── binding │ │ └── package-info.java │ │ └── source │ │ └── annotations │ │ └── xml │ │ └── mocker │ │ └── IndexBuilderTest.java │ └── main │ ├── java │ └── org │ │ └── hibernate │ │ └── boot │ │ └── registry │ │ └── selector │ │ └── package-info.java │ └── javadoc │ └── images │ ├── h1_hdr.png │ ├── bkgheader.png │ ├── bkg_blkheader.png │ └── bkg_gradient.gif ├── hibernate-entitymanager └── src │ ├── main │ ├── javadoc │ │ └── package.html │ └── resources │ │ └── META-INF │ │ └── services │ │ └── javax.persistence.spi.PersistenceProvider │ └── test │ ├── resources │ ├── DB2JccConfiguration.properties │ └── org │ │ └── hibernate │ │ └── jpa │ │ └── test │ │ └── mapping │ │ └── orm.xml │ ├── java │ ├── NoPackageEntity.java │ └── org │ │ └── hibernate │ │ └── jpa │ │ └── test │ │ ├── pack │ │ ├── explodedpar │ │ │ └── package-info.java │ │ ├── war │ │ │ ├── package-info.java │ │ │ └── Lighter.java │ │ ├── defaultpar │ │ │ ├── package-info.java │ │ │ └── Lighter.java │ │ ├── defaultpar_1_0 │ │ │ ├── package-info.java │ │ │ └── Lighter1.java │ │ ├── explicitpar │ │ │ └── Washer.java │ │ └── various │ │ │ ├── Seat.java │ │ │ └── Airplane.java │ │ ├── xml │ │ ├── Light.java │ │ ├── Lighter.java │ │ └── sequences │ │ │ ├── Light.java │ │ │ └── Lighter.java │ │ ├── metadata │ │ ├── Being.java │ │ └── SimplePerson.java │ │ ├── emops │ │ ├── Dress.java │ │ ├── Cat.java │ │ └── Colony.java │ │ ├── connection │ │ └── FakeDataSourceException.java │ │ ├── cascade │ │ └── Author.java │ │ ├── instrument │ │ └── Simple.java │ │ ├── callbacks │ │ ├── ExceptionListener.java │ │ ├── IncreaseListener.java │ │ └── FirstOneListener.java │ │ ├── MyNamingStrategy.java │ │ ├── NoOpListener.java │ │ ├── ops │ │ ├── Mammal.java │ │ ├── Reptile.java │ │ ├── Workload.java │ │ └── NumberedNode.java │ │ ├── LastUpdateListener.java │ │ └── inheritance │ │ └── Strawberry.java │ └── bundles │ └── overridenpar │ └── overridenpar.properties ├── documentation └── src │ └── main │ ├── docbook │ ├── manual │ │ ├── de-DE │ │ │ └── Hibernate_Core_Reference_Guide.po │ │ ├── en-US │ │ │ ├── images │ │ │ │ ├── lite.png │ │ │ │ ├── overview.png │ │ │ │ ├── AuthorWork.png │ │ │ │ ├── full_cream.png │ │ │ │ ├── AuthorWork.zargo │ │ │ │ ├── EmployerEmployee.png │ │ │ │ ├── hibernate_logo_a.png │ │ │ │ ├── EmployerEmployee.zargo │ │ │ │ ├── CustomerOrderProduct.png │ │ │ │ └── CustomerOrderProduct.zargo │ │ │ └── HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.ent │ │ ├── publican.cfg │ │ ├── fr-FR │ │ │ └── content │ │ │ │ └── quickstart.po │ │ ├── ja-JP │ │ │ └── content │ │ │ │ └── quickstart.po │ │ ├── pt-BR │ │ │ └── content │ │ │ │ └── quickstart.po │ │ └── zh-CN │ │ │ └── content │ │ │ └── quickstart.po │ ├── .gitignore │ ├── devguide │ │ ├── en-US │ │ │ ├── chapters │ │ │ │ ├── pc │ │ │ │ │ └── extras │ │ │ │ │ │ ├── ReattachingWithSession1.java │ │ │ │ │ │ ├── DeletingWithSession.java │ │ │ │ │ │ ├── DeletingWithEM.java │ │ │ │ │ │ ├── ContainsWithEM.java │ │ │ │ │ │ ├── ContainsWithSession.java │ │ │ │ │ │ ├── LoadWithEM.java │ │ │ │ │ │ ├── LoadWithSession.java │ │ │ │ │ │ ├── ReattachingWithSession2.java │ │ │ │ │ │ ├── MergeWithEM.java │ │ │ │ │ │ ├── MergeWithSession.java │ │ │ │ │ │ ├── RefreshWithSession.java │ │ │ │ │ │ ├── RefreshWithEM.java │ │ │ │ │ │ ├── GetReferenceWithEM.java │ │ │ │ │ │ ├── GetReferenceWithSession.java │ │ │ │ │ │ ├── ManagedUpdateWithSession.java │ │ │ │ │ │ ├── UnwrapWithEM.java │ │ │ │ │ │ ├── ManagedUpdateWithEM.java │ │ │ │ │ │ ├── MakingPersistentWithSession.java │ │ │ │ │ │ ├── MakingPersistentWithEM.java │ │ │ │ │ │ ├── VisualizingMerge.java │ │ │ │ │ │ ├── CheckingLazinessWithHibernate.java │ │ │ │ │ │ ├── CheckingLazinessWithJPA2.java │ │ │ │ │ │ └── CheckingLazinessWithJPA.java │ │ │ │ ├── transactions │ │ │ │ │ └── extras │ │ │ │ │ │ ├── jvm-identity.java │ │ │ │ │ │ └── database-identity.java │ │ │ │ ├── query_ql │ │ │ │ │ └── extras │ │ │ │ │ │ ├── simplest_query2.java │ │ │ │ │ │ ├── simplest_query.java │ │ │ │ │ │ ├── locate_bnf.txt │ │ │ │ │ │ ├── join_example_fetch.txt │ │ │ │ │ │ ├── root_entity_ref_bnf.txt │ │ │ │ │ │ ├── substring_bnf.txt │ │ │ │ │ │ ├── searched_case_bnf.txt │ │ │ │ │ │ ├── simple_case_bnf.txt │ │ │ │ │ │ ├── join_example_with.txt │ │ │ │ │ │ ├── concat_op_example.txt │ │ │ │ │ │ ├── predicate_like_bnf.txt │ │ │ │ │ │ ├── having_illustration.txt │ │ │ │ │ │ ├── empty_collection_example.txt │ │ │ │ │ │ ├── statement_delete_bnf.txt │ │ │ │ │ │ ├── entity_type_exp_example.txt │ │ │ │ │ │ ├── string_literals_example.txt │ │ │ │ │ │ ├── ctor_dynamic_instantiation_example.txt │ │ │ │ │ │ ├── list_dynamic_instantiation_example.txt │ │ │ │ │ │ ├── statement_insert_bnf.txt │ │ │ │ │ │ ├── statement_select_bnf.txt │ │ │ │ │ │ ├── member_of_collection_example.txt │ │ │ │ │ │ ├── statement_insert_example_named_id.java │ │ │ │ │ │ ├── join_example_implicit.txt │ │ │ │ │ │ ├── multiple_root_entity_ref_example2.txt │ │ │ │ │ │ ├── predicate_comparison_example_using_all.txt │ │ │ │ │ │ ├── predicate_nullness_example.txt │ │ │ │ │ │ ├── order_by_example.txt │ │ │ │ │ │ ├── arithmetic_example.txt │ │ │ │ │ │ ├── group_by_illustration.txt │ │ │ │ │ │ ├── join_example_explicit_inner.txt │ │ │ │ │ │ ├── multiple_root_entity_ref_example.txt │ │ │ │ │ │ ├── agg_func_example.txt │ │ │ │ │ │ ├── predicate_in_bnf.txt │ │ │ │ │ │ ├── nullif_example.txt │ │ │ │ │ │ ├── map_dynamic_instantiation_example.txt │ │ │ │ │ │ ├── predicate_like_example.txt │ │ │ │ │ │ ├── statement_update_example_hql.java │ │ │ │ │ │ ├── statement_update_example_jpql.java │ │ │ │ │ │ ├── statement_update_example_hql_versioned.java │ │ │ │ │ │ ├── searched_case_exp_example.txt │ │ │ │ │ │ ├── collection_reference_example.txt │ │ │ │ │ │ ├── statement_update_bnf.txt │ │ │ │ │ │ └── predicate_between_example.txt │ │ │ │ ├── events │ │ │ │ │ └── extras │ │ │ │ │ │ ├── SessionScopedExample.java │ │ │ │ │ │ ├── SessionFactoryScopedExample.java │ │ │ │ │ │ └── LoadListenerExample.java │ │ │ │ ├── query_criteria │ │ │ │ │ └── extras │ │ │ │ │ │ ├── from_root_methods.java │ │ │ │ │ │ ├── from_root_example.java │ │ │ │ │ │ ├── CriteriaBuilder_query_creation_snippet.java │ │ │ │ │ │ ├── from_join_example_plural.java │ │ │ │ │ │ ├── from_fetch_example_plural.java │ │ │ │ │ │ ├── select_root_entity_example.java │ │ │ │ │ │ ├── select_attribute_example.java │ │ │ │ │ │ ├── from_join_example_embedded_and_many2one.java │ │ │ │ │ │ └── from_fetch_example_embedded_and_many2one.java │ │ │ │ └── multitenancy │ │ │ │ │ ├── images │ │ │ │ │ ├── multitenacy_schema.png │ │ │ │ │ ├── multitenacy_database.png │ │ │ │ │ └── multitenacy_discriminator.png │ │ │ │ │ └── extras │ │ │ │ │ └── tenant-identifier-from-SessionFactory.java │ │ │ ├── extras │ │ │ │ ├── opening_a_session.java │ │ │ │ ├── foreign-key.xml │ │ │ │ ├── embedding_SchemaExport.java │ │ │ │ ├── cmt-idiom.java │ │ │ │ ├── cache_providers.xml │ │ │ │ ├── length-precision-scale.xml │ │ │ │ ├── comments.xml │ │ │ │ ├── sql-type.xml │ │ │ │ ├── browsing_cache.java │ │ │ │ ├── cache_providers_mapping.java │ │ │ │ ├── specify_mapping_files_directly.java │ │ │ │ ├── timestamp_version.java │ │ │ │ ├── letting_hibernate_find_mapping_files.java │ │ │ │ ├── version_annotation.java │ │ │ │ ├── check.xml │ │ │ │ ├── evicting_item.java │ │ │ │ ├── default-attribute.xml │ │ │ │ ├── setCacheRegion.java │ │ │ │ ├── batch_insert.java │ │ │ │ ├── child-column-elements.xml │ │ │ │ ├── notnull-unique.xml │ │ │ │ ├── timestamp_version.xml │ │ │ │ ├── hql-insert.java │ │ │ │ ├── version_property.xml │ │ │ │ ├── bmt-idiom.java │ │ │ │ ├── specifying_configuration_properties_programmatically.java │ │ │ │ ├── hibernate.properties │ │ │ │ ├── hql_delete.java │ │ │ │ ├── updating_version.java │ │ │ │ └── using_a_StatelessSession.java │ │ │ ├── Hibernate_Development_Guide.ent │ │ │ ├── JMX.xml │ │ │ └── Mapping_Entities.xml │ │ └── publican.cfg │ └── quickstart │ │ └── en-US │ │ ├── images │ │ └── hibernate_logo_a.png │ │ └── Hibernate_Getting_Started_Guide.ent │ └── style │ ├── css │ └── css │ │ ├── hibernate-single.css │ │ └── hibernate-eclipse.css │ └── images │ └── images │ └── org │ └── hibernate │ ├── dot.png │ ├── dot2.png │ ├── docbook │ ├── up.png │ ├── home.png │ ├── next.png │ ├── note.png │ ├── prev.png │ ├── tip.png │ ├── caution.png │ ├── warning.png │ ├── important.png │ └── callouts │ │ ├── 1.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ └── 9.png │ ├── title_hdr.png │ ├── bkg_gradient.png │ ├── community_doc.png │ └── hibernatelogo.png ├── hibernate-envers └── src │ ├── main │ └── resources │ │ └── META-INF │ │ ├── copyright.txt │ │ └── services │ │ └── org.hibernate.integrator.spi.Integrator │ └── test │ ├── java │ └── org │ │ └── hibernate │ │ └── envers │ │ └── test │ │ ├── integration │ │ ├── interfaces │ │ │ ├── components │ │ │ │ └── IComponent.java │ │ │ ├── relation │ │ │ │ └── ISetRefEdEntity.java │ │ │ └── hbm │ │ │ │ └── allAudited │ │ │ │ └── SimpleInterface.java │ │ └── inheritance │ │ │ └── mixed │ │ │ └── entities │ │ │ └── Activity.java │ │ ├── performance │ │ └── AllPerformance.java │ │ └── entities │ │ └── StrTestEntityComparator.java │ └── resources │ └── log4j.properties ├── hibernate_logo.gif ├── hibernate-infinispan └── src │ ├── main │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ ├── org.hibernate.boot.registry.selector.AvailabilityAnnouncer │ │ │ └── org.infinispan.commands.module.ModuleCommandExtensions │ └── java │ │ └── org │ │ └── hibernate │ │ └── cache │ │ └── infinispan │ │ └── util │ │ └── CacheCommandIds.java │ └── test │ └── resources │ └── log4j.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── release └── src │ └── javadoc │ └── images │ ├── h1_hdr.png │ ├── bkgheader.png │ ├── bkg_gradient.gif │ └── bkg_blkheader.png ├── databases └── .gitignore ├── hibernate-ehcache ├── src │ ├── main │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── org.hibernate.boot.registry.selector.AvailabilityAnnouncer │ └── test │ │ └── resources │ │ ├── hibernate-config │ │ └── ehcache.xml │ │ └── log4j.properties └── hibernate-ehcache.gradle ├── hibernate-proxool ├── hibernate-proxool.gradle └── src │ └── test │ └── resources │ ├── pool-one.properties │ └── pool-two.properties ├── hibernate-c3p0 ├── hibernate-c3p0.gradle └── src │ └── test │ └── resources │ └── log4j.properties └── hibernate-testing └── hibernate-testing.gradle /hibernate-core/src/test/resources/spy.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/main/javadoc/package.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/de-DE/Hibernate_Core_Reference_Guide.po: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore publican output 2 | */tmp 3 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/ReattachingWithSession1.java: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hibernate-envers/src/main/resources/META-INF/copyright.txt: -------------------------------------------------------------------------------- 1 | (c) 2008, Adam Warski, JBoss Inc. -------------------------------------------------------------------------------- /hibernate_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/hibernate_logo.gif -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/transactions/extras/jvm-identity.java: -------------------------------------------------------------------------------- 1 | foo==bar -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/DeletingWithSession.java: -------------------------------------------------------------------------------- 1 | session.delete( fritz ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/simplest_query2.java: -------------------------------------------------------------------------------- 1 | select c from Cat c -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/DeletingWithEM.java: -------------------------------------------------------------------------------- 1 | entityManager.remove( fritz ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/simplest_query.java: -------------------------------------------------------------------------------- 1 | select c from com.acme.Cat c -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/opening_a_session.java: -------------------------------------------------------------------------------- 1 | Session session = sessions.openSession(); -------------------------------------------------------------------------------- /hibernate-infinispan/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.AvailabilityAnnouncer: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/ContainsWithEM.java: -------------------------------------------------------------------------------- 1 | assert entityManager.contains( cat ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/ContainsWithSession.java: -------------------------------------------------------------------------------- 1 | assert session.contains( cat ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/LoadWithEM.java: -------------------------------------------------------------------------------- 1 | entityManager.find( Author.class, authorId ); -------------------------------------------------------------------------------- /documentation/src/main/style/css/css/hibernate-single.css: -------------------------------------------------------------------------------- 1 | @import url("hibernate.css"); 2 | 3 | .title {margin-top:30px;} 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /hibernate-core/src/main/java/org/hibernate/boot/registry/selector/package-info.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.boot.registry.selector; -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/LoadWithSession.java: -------------------------------------------------------------------------------- 1 | session.byId( Author.class ).load( authorId ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/ReattachingWithSession2.java: -------------------------------------------------------------------------------- 1 | session.saveOrUpdate( someDetachedCat ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/transactions/extras/database-identity.java: -------------------------------------------------------------------------------- 1 | foo.getId().equals( bar.getId() ) -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/foreign-key.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documentation/src/main/style/css/css/hibernate-eclipse.css: -------------------------------------------------------------------------------- 1 | @import url("hibernate.css"); 2 | 3 | body {background-image:none;} 4 | -------------------------------------------------------------------------------- /hibernate-envers/src/main/resources/META-INF/services/org.hibernate.integrator.spi.Integrator: -------------------------------------------------------------------------------- 1 | org.hibernate.envers.event.EnversIntegrator -------------------------------------------------------------------------------- /release/src/javadoc/images/h1_hdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/release/src/javadoc/images/h1_hdr.png -------------------------------------------------------------------------------- /release/src/javadoc/images/bkgheader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/release/src/javadoc/images/bkgheader.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/MergeWithEM.java: -------------------------------------------------------------------------------- 1 | Cat theManagedInstance = entityManager.merge( someDetachedCat ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/MergeWithSession.java: -------------------------------------------------------------------------------- 1 | Cat theManagedInstance = session.merge( someDetachedCat ); -------------------------------------------------------------------------------- /hibernate-entitymanager/src/main/resources/META-INF/services/javax.persistence.spi.PersistenceProvider: -------------------------------------------------------------------------------- 1 | org.hibernate.ejb.HibernatePersistence 2 | -------------------------------------------------------------------------------- /release/src/javadoc/images/bkg_gradient.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/release/src/javadoc/images/bkg_gradient.gif -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/locate_bnf.txt: -------------------------------------------------------------------------------- 1 | locate( string_expression, string_expression[, numeric_expression] ) -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/embedding_SchemaExport.java: -------------------------------------------------------------------------------- 1 | Configuration cfg = ....; 2 | new SchemaExport(cfg).create(false, true); -------------------------------------------------------------------------------- /release/src/javadoc/images/bkg_blkheader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/release/src/javadoc/images/bkg_blkheader.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/join_example_fetch.txt: -------------------------------------------------------------------------------- 1 | select c 2 | from Customer c 3 | left join fetch c.orders o -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/DB2JccConfiguration.properties: -------------------------------------------------------------------------------- 1 | #see https://issues.jboss.org/browse/JBPAPP-2613 2 | db2.jcc.override.progressiveStreaming=2 -------------------------------------------------------------------------------- /databases/.gitignore: -------------------------------------------------------------------------------- 1 | #Ignore any sub directory named 'local'. these are used to define custom database profiles local 2 | # to the developer's machine 3 | /local -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/root_entity_ref_bnf.txt: -------------------------------------------------------------------------------- 1 | root_entity_reference ::= entity_name [AS] identification_variable -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/substring_bnf.txt: -------------------------------------------------------------------------------- 1 | substring( string_expression, numeric_expression [, numeric_expression] ) -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/cmt-idiom.java: -------------------------------------------------------------------------------- 1 | // CMT idiom 2 | Session sess = factory.getCurrentSession(); 3 | // do some work 4 | ... 5 | -------------------------------------------------------------------------------- /hibernate-core/src/main/javadoc/images/h1_hdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/hibernate-core/src/main/javadoc/images/h1_hdr.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/events/extras/SessionScopedExample.java: -------------------------------------------------------------------------------- 1 | Session session = sf.withOptions( new AuditInterceptor() ).openSession(); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/RefreshWithSession.java: -------------------------------------------------------------------------------- 1 | Cat cat = session.get( Cat.class, catId ); 2 | ... 3 | session.refresh( cat ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/from_root_methods.java: -------------------------------------------------------------------------------- 1 | Root from(Class); 2 | 3 | Root from(EntityType) -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/searched_case_bnf.txt: -------------------------------------------------------------------------------- 1 | CASE [ WHEN {test_conditional} THEN {match_result} ]* ELSE {miss_result} END -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/simple_case_bnf.txt: -------------------------------------------------------------------------------- 1 | CASE {operand} WHEN {test_value} THEN {match_result} ELSE {miss_result} END -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/cache_providers.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/length-precision-scale.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /hibernate-core/src/main/javadoc/images/bkgheader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/hibernate-core/src/main/javadoc/images/bkgheader.png -------------------------------------------------------------------------------- /hibernate-ehcache/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.AvailabilityAnnouncer: -------------------------------------------------------------------------------- 1 | org.hibernate.cache.ehcache.AvailabilityAnnouncerImpl -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/resources/DB2JccConfiguration.properties: -------------------------------------------------------------------------------- 1 | #see https://issues.jboss.org/browse/JBPAPP-2613 2 | db2.jcc.override.progressiveStreaming=2 -------------------------------------------------------------------------------- /hibernate-core/src/main/javadoc/images/bkg_blkheader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/hibernate-core/src/main/javadoc/images/bkg_blkheader.png -------------------------------------------------------------------------------- /hibernate-core/src/main/javadoc/images/bkg_gradient.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/hibernate-core/src/main/javadoc/images/bkg_gradient.gif -------------------------------------------------------------------------------- /hibernate-infinispan/src/main/resources/META-INF/services/org.infinispan.commands.module.ModuleCommandExtensions: -------------------------------------------------------------------------------- 1 | org.hibernate.cache.infinispan.util.CacheCommandExtensions -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/RefreshWithEM.java: -------------------------------------------------------------------------------- 1 | Cat cat = entityManager.find( Cat.class, catId ); 2 | ... 3 | entityManager.refresh( cat ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/comments.xml: -------------------------------------------------------------------------------- 1 | 2 | Current customers only 3 | ... 4 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/sql-type.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/lite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/lite.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/publican.cfg: -------------------------------------------------------------------------------- 1 | # Config::Simple 4.59 2 | # Wed Dec 9 09:53:51 2009 3 | 4 | debug: 1 5 | xml_lang: en-US 6 | brand: jboss-community-hibernate 7 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/GetReferenceWithEM.java: -------------------------------------------------------------------------------- 1 | Book book = new Book(); 2 | book.setAuthor( entityManager.getReference( Author.class, authorId ) ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/overview.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/GetReferenceWithSession.java: -------------------------------------------------------------------------------- 1 | Book book = new Book(); 2 | book.setAuthor( session.byId( Author.class ).getReference( authorId ) ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/join_example_with.txt: -------------------------------------------------------------------------------- 1 | select distinct c 2 | from Customer c 3 | left join c.orders o 4 | with o.value > 5000.00 -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/publican.cfg: -------------------------------------------------------------------------------- 1 | # Config::Simple 4.59 2 | # Mon Jan 17 13:52:44 2011 3 | 4 | xml_lang: en-US 5 | type: Book 6 | brand: jboss-community-hibernate 7 | 8 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/AuthorWork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/AuthorWork.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/full_cream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/full_cream.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/dot.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/dot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/dot2.png -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/mapping/usertypes/TestEnum.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.mapping.usertypes; 2 | 3 | public enum TestEnum { 4 | FOO, 5 | BAR; 6 | } 7 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/concat_op_example.txt: -------------------------------------------------------------------------------- 1 | select 'Mr. ' || c.name.first || ' ' || c.name.last 2 | from Customer c 3 | where c.gender = Gender.MALE -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/AuthorWork.zargo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/AuthorWork.zargo -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/browsing_cache.java: -------------------------------------------------------------------------------- 1 | Map cacheEntries = sessionFactory.getStatistics() 2 | .getSecondLevelCacheStatistics(regionName) 3 | .getEntries(); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/cache_providers_mapping.java: -------------------------------------------------------------------------------- 1 | @Entity 2 | @Cacheable 3 | @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) 4 | public class Forest { ... } -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/specify_mapping_files_directly.java: -------------------------------------------------------------------------------- 1 | Configuration cfg = new Configuration() 2 | .addResource("Item.hbm.xml") 3 | .addResource("Bid.hbm.xml"); -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/EmployerEmployee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/EmployerEmployee.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/hibernate_logo_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/hibernate_logo_a.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/up.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/title_hdr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/title_hdr.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/timestamp_version.java: -------------------------------------------------------------------------------- 1 | @Entity 2 | public class Flight implements Serializable { 3 | ... 4 | @Version 5 | public Date getLastUpdate() { ... } 6 | } -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/EmployerEmployee.zargo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/EmployerEmployee.zargo -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/bkg_gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/bkg_gradient.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/home.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/next.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/note.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/prev.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/tip.png -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/propertyref/import.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `vgras007_v031` VALUES ('ZZZ','00',1); 2 | 3 | INSERT INTO `vgras029_v031` VALUES (1,'Foo Foo Foo',1), (1,'Bar Bar Bar',2); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/stats/State.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.stats; 2 | 3 | 4 | /** 5 | * @author Steve Ebersole 6 | */ 7 | public class State extends Locality { 8 | } 9 | -------------------------------------------------------------------------------- /hibernate-ehcache/hibernate-ehcache.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project( ':hibernate-core' ) 3 | compile( libraries.ehcache ) 4 | 5 | testCompile project( ':hibernate-testing' ) 6 | } 7 | -------------------------------------------------------------------------------- /hibernate-proxool/hibernate-proxool.gradle: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | compile project( ':hibernate-core' ) 4 | compile( libraries.proxool ) 5 | testCompile project( ':hibernate-testing' ) 6 | } 7 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/CustomerOrderProduct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/CustomerOrderProduct.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/quickstart/en-US/images/hibernate_logo_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/quickstart/en-US/images/hibernate_logo_a.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/community_doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/community_doc.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/caution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/caution.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/warning.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/hibernatelogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/hibernatelogo.png -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/stats/Province.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.stats; 2 | 3 | 4 | /** 5 | * @author Steve Ebersole 6 | */ 7 | public class Province extends Locality { 8 | } 9 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/Hibernate_Development_Guide.ent: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/images/CustomerOrderProduct.zargo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/manual/en-US/images/CustomerOrderProduct.zargo -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/important.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/important.png -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/org/hibernate/test/fileimport/dogs.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO dog (id, master_fk) VALUES (1,1) 2 | INSERT INTO dog (id, master_fk) VALUES (2,2) 3 | INSERT INTO dog (id, master_fk) VALUES (3,3) -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/JMX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JMX 5 | 6 | 7 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/predicate_like_bnf.txt: -------------------------------------------------------------------------------- 1 | like_expression ::= 2 | string_expression 3 | [NOT] LIKE pattern_value 4 | [ESCAPE escape_character] 5 | -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/1.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/10.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/11.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/12.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/13.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/14.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/15.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/2.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/3.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/4.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/5.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/6.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/7.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/8.png -------------------------------------------------------------------------------- /documentation/src/main/style/images/images/org/hibernate/docbook/callouts/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/style/images/images/org/hibernate/docbook/callouts/9.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/having_illustration.txt: -------------------------------------------------------------------------------- 1 | select c.id, sum( o.total ) 2 | from Order o 3 | inner join o.customer c 4 | group by c.id 5 | having sum( o.total ) > 10000.00 -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/mappingexception/InvalidMapping.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.mappingexception; 2 | 3 | 4 | public class InvalidMapping { 5 | // This Class Intentionally Left Blank 6 | } 7 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/ManagedUpdateWithSession.java: -------------------------------------------------------------------------------- 1 | Cat cat = session.get( Cat.class, catId ); 2 | cat.setName( "Garfield" ); 3 | session.flush(); // generally this is not explicitly needed -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/UnwrapWithEM.java: -------------------------------------------------------------------------------- 1 | Session session = entityManager.unwrap( Session.class ); 2 | SessionImplementor sessionImplementor = entityManager.unwrap( SessionImplementor.class ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/empty_collection_example.txt: -------------------------------------------------------------------------------- 1 | select o 2 | from Order o 3 | where o.lineItems is empty 4 | 5 | select c 6 | from Customer c 7 | where c.pastDueBills is not empty -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/statement_delete_bnf.txt: -------------------------------------------------------------------------------- 1 | delete_statement ::= delete_clause [where_clause] 2 | 3 | delete_clause ::= DELETE FROM entity_name [[AS] identification_variable] 4 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/NoPackageEntity.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | 3 | /** 4 | * @author Emmanuel Bernard 5 | */ 6 | public class NoPackageEntity { 7 | private Integer id; 8 | private String name; 9 | } 10 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/from_root_example.java: -------------------------------------------------------------------------------- 1 | CriteriaQuery personCriteria = builder.createQuery( Person.class ); 2 | // create and add the root 3 | person.from( Person.class ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/entity_type_exp_example.txt: -------------------------------------------------------------------------------- 1 | select p 2 | from Payment p 3 | where type(p) = CreditCardPayment 4 | 5 | select p 6 | from Payment p 7 | where type(p) = :aType 8 | 9 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/letting_hibernate_find_mapping_files.java: -------------------------------------------------------------------------------- 1 | Configuration cfg = new Configuration() 2 | .addClass(org.hibernate.auction.Item.class) 3 | .addClass(org.hibernate.auction.Bid.class); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/optional/Org.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.onetoone.optional; 2 | 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Org extends Entity { 9 | } 10 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/events/extras/SessionFactoryScopedExample.java: -------------------------------------------------------------------------------- 1 | SessionFactory sessionFactory = new Configuration() 2 | .setInterceptor( new AuditInterceptor() ) 3 | ... 4 | .buildSessionFactory(); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/ManagedUpdateWithEM.java: -------------------------------------------------------------------------------- 1 | Cat cat = entityManager.find( Cat.class, catId ); 2 | cat.setName( "Garfield" ); 3 | entityManager.flush(); // generally this is not explicitly needed -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/string_literals_example.txt: -------------------------------------------------------------------------------- 1 | select c 2 | from Customer c 3 | where c.name = 'Acme' 4 | 5 | select c 6 | from Customer c 7 | where c.name = 'Acme''s Pretzel Logic' 8 | 9 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/version_annotation.java: -------------------------------------------------------------------------------- 1 | @Entity 2 | public class Flight implements Serializable { 3 | ... 4 | @Version 5 | @Column(name="OPTLOCK") 6 | public Integer getVersion() { ... } 7 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/any/Property.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.any; 2 | 3 | 4 | public interface Property { 5 | 6 | public String getName(); 7 | public String asString(); 8 | } 9 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/criteria/Man.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.criteria; 2 | 3 | /** 4 | * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) 5 | */ 6 | public class Man extends Person { 7 | } 8 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/quickstart/en-US/Hibernate_Getting_Started_Guide.ent: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/metamodel/binding/package-info.java: -------------------------------------------------------------------------------- 1 | @GenericGenerator(name = "myGenerator", strategy = "sequence") 2 | package org.hibernate.metamodel.binding; 3 | 4 | import org.hibernate.annotations.GenericGenerator; -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/criteria/Woman.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.criteria; 2 | 3 | /** 4 | * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) 5 | */ 6 | public class Woman extends Person { 7 | } 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/TrivialClass.java: -------------------------------------------------------------------------------- 1 | //$Id: TrivialClass.java 4599 2004-09-26 05:18:27Z oneovthafew $ 2 | package org.hibernate.test.legacy; 3 | 4 | 5 | public class TrivialClass extends Top { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/optional/Entity.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.onetoone.optional; 2 | 3 | 4 | /** 5 | * @author Gavin King 6 | */ 7 | public class Entity { 8 | public String name; 9 | } 10 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/MakingPersistentWithSession.java: -------------------------------------------------------------------------------- 1 | DomesticCat fritz = new DomesticCat(); 2 | fritz.setColor( Color.GINGER ); 3 | fritz.setSex( 'M' ); 4 | fritz.setName( "Fritz" ); 5 | session.save( fritz ); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/jpa/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

5 | Tests for any JPA-specific behavior for which we need to ensure 6 | compliance. 7 |

8 | 9 | 10 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/mappingexception/InvalidMapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This File Intentionally Left Blank -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/multitenancy/images/multitenacy_schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/devguide/en-US/chapters/multitenancy/images/multitenacy_schema.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/MakingPersistentWithEM.java: -------------------------------------------------------------------------------- 1 | DomesticCat fritz = new DomesticCat(); 2 | fritz.setColor( Color.GINGER ); 3 | fritz.setSex( 'M' ); 4 | fritz.setName( "Fritz" ); 5 | entityManager.persist( fritz ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/ctor_dynamic_instantiation_example.txt: -------------------------------------------------------------------------------- 1 | select new Family( mother, mate, offspr ) 2 | from DomesticCat as mother 3 | join mother.mate as mate 4 | left join mother.kittens as offspr -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/criteria/Code.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.criteria; 2 | 3 | /** 4 | * @author Strong Liu 5 | */ 6 | public enum Code { 7 | ADM, CEN, RPA, RPP, PRJ, HUB, RQS, OAD, ORP, ORQ 8 | } 9 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/bundles/overridenpar/overridenpar.properties: -------------------------------------------------------------------------------- 1 | hibernate.connection.driver_class @jdbc.driver@ 2 | hibernate.connection.url @jdbc.url@ 3 | hibernate.connection.username @jdbc.user@ 4 | hibernate.connection.password @jdbc.pass@ -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/explodedpar/package-info.java: -------------------------------------------------------------------------------- 1 | @NamedQuery(name = "allCarpet", query = "select c from Carpet c") package org.hibernate.jpa.test.pack.explodedpar; 2 | import org.hibernate.annotations.NamedQuery; -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/multitenancy/extras/tenant-identifier-from-SessionFactory.java: -------------------------------------------------------------------------------- 1 | Session session = sessionFactory.withOptions() 2 | .tenantIdentifier( yourTenantIdentifier ) 3 | ... 4 | .openSession(); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/multitenancy/images/multitenacy_database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/devguide/en-US/chapters/multitenancy/images/multitenacy_database.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/VisualizingMerge.java: -------------------------------------------------------------------------------- 1 | Object detached = ...; 2 | Object managed = entityManager.find( detached.getClass(), detached.getId() ); 3 | managed.setXyz( detached.getXyz() ); 4 | ... 5 | return managed; -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/entity/Starred.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.entity; 2 | 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public enum Starred { 8 | BAD, 9 | OK, 10 | GOOD 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/polymorphism/MovingThing.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.polymorphism; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class MovingThing { 9 | } 10 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/war/package-info.java: -------------------------------------------------------------------------------- 1 | @NamedQuery(name = "allMouse", 2 | query = "select m from ApplicationServer m") 3 | package org.hibernate.jpa.test.pack.war; 4 | import org.hibernate.annotations.NamedQuery; -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/CriteriaBuilder_query_creation_snippet.java: -------------------------------------------------------------------------------- 1 | CriteriaQuery createQuery(Class resultClass); 2 | CriteriaQuery createTupleQuery(); 3 | CriteriaQuery createQuery(); 4 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/en-US/HIBERNATE_-_Relational_Persistence_for_Idiomatic_Java.ent: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/id/entities/Planet.java: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | package org.hibernate.test.annotations.id.entities; 3 | 4 | 5 | public enum Planet { 6 | MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO; 7 | } 8 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/multitenancy/images/multitenacy_discriminator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rhinoman/hibernate-core/master/documentation/src/main/docbook/devguide/en-US/chapters/multitenancy/images/multitenacy_discriminator.png -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/list_dynamic_instantiation_example.txt: -------------------------------------------------------------------------------- 1 | select new list(mother, offspr, mate.name) 2 | from DomesticCat as mother 3 | inner join mother.mate as mate 4 | left outer join mother.kittens as offspr -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/statement_insert_bnf.txt: -------------------------------------------------------------------------------- 1 | insert_statement ::= insert_clause select_statement 2 | 3 | insert_clause ::= INSERT INTO entity_name (attribute_list) 4 | 5 | attribute_list ::= state_field[, state_field ]* -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/generics/State.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.generics; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public enum State { 9 | ACTIVE, 10 | DORMANT 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/collectionelement/FavoriteFood.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.collectionelement; 2 | 3 | 4 | public enum FavoriteFood { 5 | SUSHI, 6 | KUNGPAOCHICKEN, 7 | ROASTBEEF, 8 | PIZZA 9 | } 10 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/configuration/package-info.java: -------------------------------------------------------------------------------- 1 | @GenericGenerator(name = "myGenerator", strategy = "sequence") 2 | package org.hibernate.test.annotations.configuration; 3 | import org.hibernate.annotations.GenericGenerator; 4 | 5 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/entity/Length.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.entity; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public interface Length { 9 | Type getLength(); 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/Cat.java: -------------------------------------------------------------------------------- 1 | //$Id: Cat.java 4476 2004-09-02 02:28:13Z oneovthafew $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Cat extends DomesticAnimal { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/Dog.java: -------------------------------------------------------------------------------- 1 | //$Id: Dog.java 4476 2004-09-02 02:28:13Z oneovthafew $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Dog extends DomesticAnimal { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/org/hibernate/test/fileimport/humans.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO human (id, fname, lname) VALUES (1,'Emmanuel','Bernard') 2 | INSERT INTO human (id, fname, lname) VALUES (2,'Gavin','King') 3 | INSERT INTO human (id, fname, lname) VALUES (3,'Max','Andersen') -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/xml/Light.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.xml; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Light { 9 | public String name; 10 | public String power; 11 | } 12 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/statement_select_bnf.txt: -------------------------------------------------------------------------------- 1 | select_statement :: = 2 | [select_clause] 3 | from_clause 4 | [where_clause] 5 | [groupby_clause] 6 | [having_clause] 7 | [orderby_clause] -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/check.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ... 6 | 7 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/Lizard.java: -------------------------------------------------------------------------------- 1 | //$Id: Lizard.java 3890 2004-06-03 16:31:32Z steveebersole $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Lizard extends Reptile { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/Trivial.java: -------------------------------------------------------------------------------- 1 | //$Id: Trivial.java 4599 2004-09-26 05:18:27Z oneovthafew $ 2 | package org.hibernate.test.legacy; 3 | 4 | 5 | 6 | public class Trivial extends Foo { 7 | 8 | } 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/defaultpar/package-info.java: -------------------------------------------------------------------------------- 1 | @NamedQuery(name = "allMouse", 2 | query = "select m from ApplicationServer m") package org.hibernate.jpa.test.pack.defaultpar; 3 | import org.hibernate.annotations.NamedQuery; 4 | 5 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/xml/Lighter.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.xml; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Lighter { 9 | public String name; 10 | public String power; 11 | } 12 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/member_of_collection_example.txt: -------------------------------------------------------------------------------- 1 | select p 2 | from Person p 3 | where 'John' member of p.nickNames 4 | 5 | select p 6 | from Person p 7 | where p.name.first = 'Joseph' 8 | and 'Joey' not member of p.nickNames 9 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/statement_insert_example_named_id.java: -------------------------------------------------------------------------------- 1 | String hqlInsert = "insert into DelinquentAccount (id, name) select c.id, c.name from Customer c where ..."; 2 | int createdEntities = s.createQuery( hqlInsert ).executeUpdate(); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/manytoone/referencedcolumnname/Vendor.java: -------------------------------------------------------------------------------- 1 | //$ 2 | package org.hibernate.test.annotations.manytoone.referencedcolumnname; 3 | import javax.persistence.Entity; 4 | 5 | @Entity 6 | public class Vendor extends GenericObject { 7 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/PettingZoo.java: -------------------------------------------------------------------------------- 1 | //$Id: PettingZoo.java 4857 2004-12-02 16:28:57Z oneovthafew $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class PettingZoo extends Zoo { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/metadata/Being.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.jpa.test.metadata; 2 | import javax.persistence.MappedSuperclass; 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | @MappedSuperclass 8 | public class Being { 9 | } 10 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/join_example_implicit.txt: -------------------------------------------------------------------------------- 1 | select c 2 | from Customer c 3 | where c.chiefExecutive.age < 25 4 | 5 | // same as 6 | select c 7 | from Customer c 8 | inner join c.chiefExecutive ceo 9 | where ceo.age < 25 10 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/evicting_item.java: -------------------------------------------------------------------------------- 1 | ScrollableResult cats = sess.createQuery("from Cat as cat").scroll(); //a huge result set 2 | while ( cats.next() ) { 3 | Cat cat = (Cat) cats.get(0); 4 | doSomethingWithACat(cat); 5 | sess.evict(cat); 6 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Sep 01 02:41:24 CST 2011 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.1-bin.zip 7 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/A320b.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity() 9 | public class A320b extends A320 { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/reflection/Availability.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.reflection; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public enum Availability { 9 | ON_DUTY, 10 | NO_SERVICE 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/any/PropertyValue.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.any; 2 | 3 | 4 | /** 5 | * todo: describe PropertyValue 6 | * 7 | * @author Steve Ebersole 8 | */ 9 | public interface PropertyValue { 10 | public String asString(); 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/Named.java: -------------------------------------------------------------------------------- 1 | //$Id: Named.java 4599 2004-09-26 05:18:27Z oneovthafew $ 2 | package org.hibernate.test.legacy; 3 | 4 | 5 | 6 | public interface Named { 7 | public String getName(); 8 | } 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/defaultpar_1_0/package-info.java: -------------------------------------------------------------------------------- 1 | @NamedQuery(name = "allMouse_1_0", 2 | query = "select m from ApplicationServer1 m") 3 | package org.hibernate.jpa.test.pack.defaultpar_1_0; 4 | import org.hibernate.annotations.NamedQuery; -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/war/Lighter.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.pack.war; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Lighter { 9 | public String name; 10 | public String power; 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/entitynonentity/Cellular.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.entitynonentity; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Cellular extends Phone { 9 | String brand; 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/genericsinheritance/ChildHierarchy1.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.genericsinheritance; 2 | import javax.persistence.Entity; 3 | 4 | @Entity 5 | public class ChildHierarchy1 extends Child { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/genericsinheritance/ParentHierarchy1.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.genericsinheritance; 2 | import javax.persistence.Entity; 3 | 4 | @Entity 5 | public class ParentHierarchy1 extends Parent { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/manytoone/referencedcolumnname/Item.java: -------------------------------------------------------------------------------- 1 | //$ 2 | package org.hibernate.test.annotations.manytoone.referencedcolumnname; 3 | import javax.persistence.Entity; 4 | 5 | 6 | @Entity 7 | public class Item extends GenericObject { 8 | } 9 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/joined/Org.java: -------------------------------------------------------------------------------- 1 | //$Id: Org.java 5686 2005-02-12 07:27:32Z steveebersole $ 2 | package org.hibernate.test.onetoone.joined; 3 | 4 | 5 | 6 | /** 7 | * @author Gavin King 8 | */ 9 | public class Org extends Entity { 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/mixed/Folder.java: -------------------------------------------------------------------------------- 1 | //$Id: Folder.java 8670 2005-11-25 17:36:29Z epbernard $ 2 | 3 | package org.hibernate.test.mixed; 4 | 5 | 6 | 7 | /** 8 | * @author Gavin King 9 | */ 10 | 11 | public class Folder extends Item { 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/optional/Person.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.onetoone.optional; 2 | 3 | 4 | /** 5 | * @author Gavin King 6 | */ 7 | public class Person extends Entity { 8 | public Address address; 9 | public Address mailingAddress; 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/xml/sequences/Light.java: -------------------------------------------------------------------------------- 1 | //$Id: $ 2 | package org.hibernate.jpa.test.xml.sequences; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Light { 9 | public String name; 10 | public String power; 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/inheritance/Apple.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.inheritance; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Apple extends Fruit { 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/interfaces/Contact.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.interfaces; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public interface Contact { 9 | Integer getId(); 10 | 11 | String getName(); 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/SUV.java: -------------------------------------------------------------------------------- 1 | // $Id: SUV.java 7087 2005-06-08 18:23:44Z steveebersole $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * Implementation of SUV. 7 | * 8 | * @author Steve Ebersole 9 | */ 10 | public class SUV extends Truck { 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/joined/Entity.java: -------------------------------------------------------------------------------- 1 | //$Id: Entity.java 5686 2005-02-12 07:27:32Z steveebersole $ 2 | package org.hibernate.test.onetoone.joined; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Entity { 9 | public String name; 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/defaultpar/Lighter.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.pack.defaultpar; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Lighter { 9 | public String name; 10 | public String power; 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/xml/sequences/Lighter.java: -------------------------------------------------------------------------------- 1 | //$Id: $ 2 | package org.hibernate.jpa.test.xml.sequences; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Lighter { 9 | public String name; 10 | public String power; 11 | } 12 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/default-attribute.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/genericsinheritance/ChildHierarchy22.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.genericsinheritance; 2 | import javax.persistence.Entity; 3 | 4 | @Entity 5 | public class ChildHierarchy22 extends ChildHierarchy2 { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/genericsinheritance/ParentHierarchy22.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.genericsinheritance; 2 | import javax.persistence.Entity; 3 | 4 | @Entity 5 | public class ParentHierarchy22 extends ParentHierarchy2 { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/id/entities/FirTree.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.id.entities; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class FirTree extends Tree { 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/Car.java: -------------------------------------------------------------------------------- 1 | // $Id: Car.java 7087 2005-06-08 18:23:44Z steveebersole $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * Implementation of Car. 7 | * 8 | * @author Steve Ebersole 9 | */ 10 | public class Car extends Vehicle { 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/defaultpar_1_0/Lighter1.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.pack.defaultpar_1_0; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Lighter1 { 9 | public String name; 10 | public String power; 11 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/entitynonentity/Communication.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.entitynonentity; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Communication extends Interaction { 9 | String species; 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/Truck.java: -------------------------------------------------------------------------------- 1 | // $Id: Truck.java 7087 2005-06-08 18:23:44Z steveebersole $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * Implementation of Truck. 7 | * 8 | * @author Steve Ebersole 9 | */ 10 | public class Truck extends Vehicle { 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/singletable/Entity.java: -------------------------------------------------------------------------------- 1 | //$Id: Entity.java 5686 2005-02-12 07:27:32Z steveebersole $ 2 | package org.hibernate.test.onetoone.singletable; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Entity { 9 | public String name; 10 | } 11 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/multiple_root_entity_ref_example2.txt: -------------------------------------------------------------------------------- 1 | // retrieve all customers with headquarters in the same state as Acme's headquarters 2 | select distinct c1 3 | from Customer c1, Customer c2 4 | where c1.address.state = c2.address.state 5 | and c2.name = 'Acme' -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/setCacheRegion.java: -------------------------------------------------------------------------------- 1 | List blogs = sess.createQuery("from Blog blog where blog.blogger = :blogger") 2 | .setEntity("blogger", blogger) 3 | .setMaxResults(15) 4 | .setCacheable(true) 5 | .setCacheRegion("frontpages") 6 | .list(); 7 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/generics/Paper.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.generics; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Paper extends Item { 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/reflection/Competition.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.reflection; 3 | import javax.persistence.MappedSuperclass; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @MappedSuperclass 9 | public class Competition { 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/B.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.xml.hbm; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public interface B extends A { 9 | public Integer getBId(); 10 | 11 | public void setBId(Integer bId); 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/entityname/Car.java: -------------------------------------------------------------------------------- 1 | // $Id: Car.java 7087 2005-06-08 18:23:44Z steveebersole $ 2 | package org.hibernate.test.entityname; 3 | 4 | 5 | /** 6 | * Implementation of Car. 7 | * 8 | * @author Steve Ebersole 9 | */ 10 | public class Car extends Vehicle { 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/Pickup.java: -------------------------------------------------------------------------------- 1 | // $Id: Pickup.java 7087 2005-06-08 18:23:44Z steveebersole $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * Implementation of Pickup. 7 | * 8 | * @author Steve Ebersole 9 | */ 10 | public class Pickup extends Truck { 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/stateless/Country.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.stateless; 2 | 3 | 4 | public class Country { 5 | private Integer id; 6 | 7 | public Integer getId() { 8 | return id; 9 | } 10 | 11 | public void setId(Integer id) { 12 | this.id = id; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/predicate_comparison_example_using_all.txt: -------------------------------------------------------------------------------- 1 | // select all players that scored at least 3 points 2 | // in every game. 3 | select p 4 | from Player p 5 | where 3 > all ( 6 | select spg.points 7 | from StatsPerGame spg 8 | where spg.player = p 9 | ) -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/predicate_nullness_example.txt: -------------------------------------------------------------------------------- 1 | // select everyone with an associated address 2 | select p 3 | from Person p 4 | where p.address is not null 5 | 6 | // select everyone without an associated address 7 | select p 8 | from Person p 9 | where p.address is null -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/batch_insert.java: -------------------------------------------------------------------------------- 1 | Session session = sessionFactory.openSession(); 2 | Transaction tx = session.beginTransaction(); 3 | for ( int i=0; i<100000; i++ ) { 4 | Customer customer = new Customer(.....); 5 | session.save(customer); 6 | } 7 | tx.commit(); 8 | session.close(); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/child-column-elements.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/inheritance/joined/SwimmingPool.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.inheritance.joined; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class SwimmingPool extends Pool { 10 | } -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/order_by_example.txt: -------------------------------------------------------------------------------- 1 | // legal because p.name is implicitly part of p 2 | select p 3 | from Person p 4 | order by p.name 5 | 6 | select c.id, sum( o.total ) as t 7 | from Order o 8 | inner join o.customer c 9 | group by c.id 10 | order by t 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/genericsinheritance/ChildHierarchy2.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.genericsinheritance; 2 | import javax.persistence.MappedSuperclass; 3 | 4 | @MappedSuperclass 5 | public class ChildHierarchy2

extends Child

{ 6 | 7 | } 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/genericsinheritance/ParentHierarchy2.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.genericsinheritance; 2 | import javax.persistence.MappedSuperclass; 3 | 4 | @MappedSuperclass 5 | public class ParentHierarchy2 extends Parent { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/Mapping_Entities.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Mapping entities 5 |

6 | Hierarchies 7 | 8 |
9 | 10 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/entitynonentity/GSM.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.entitynonentity; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class GSM extends Cellular { 10 | int frequency; 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/Multiplicity.java: -------------------------------------------------------------------------------- 1 | //$Id: Multiplicity.java 4599 2004-09-26 05:18:27Z oneovthafew $ 2 | package org.hibernate.test.legacy; 3 | import java.io.Serializable; 4 | 5 | public class Multiplicity implements Serializable { 6 | public int count; 7 | public GlarchProxy glarch; 8 | } 9 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/notnull-unique.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/cid/Product.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.cid; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Product { 10 | @Id 11 | public String name; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/generics/PricedStuff.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.generics; 3 | import javax.persistence.MappedSuperclass; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @MappedSuperclass 9 | public class PricedStuff extends Stuff { 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/inheritance/singletable/PaperTrash.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.inheritance.singletable; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class PaperTrash extends Trash { 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/A.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.xml.hbm; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public interface A extends java.io.Serializable { 9 | public Integer getAId(); 10 | 11 | public void setAId(Integer aId); 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/instrument/cases/Executable.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.instrument.cases; 2 | 3 | 4 | /** 5 | * @author Steve Ebersole 6 | */ 7 | public interface Executable { 8 | public void prepare(); 9 | public void execute() throws Exception; 10 | public void complete(); 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/Super.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.legacy; 2 | 3 | 4 | public class Super { 5 | 6 | protected String name; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | public void setName(String name) { 12 | this.name = name; 13 | } 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/explicitpar/Washer.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.pack.explicitpar; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Washer { 10 | //No @id so picking it up should fail 11 | } 12 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/arithmetic_example.txt: -------------------------------------------------------------------------------- 1 | select year( current_date() ) - year( c.dateOfBirth ) 2 | from Customer c 3 | 4 | select c 5 | from Customer c 6 | where year( current_date() ) - year( c.dateOfBirth ) < 30 7 | 8 | select o.customer, o.total + ( o.total * :salesTax ) 9 | from Order o -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/bytecode/Tool.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.bytecode; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public interface Tool { 9 | public Long getId(); 10 | 11 | public void setId(Long id); 12 | 13 | public Number usage(); 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/collectionelement/Character.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.collectionelement; 2 | 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public enum Character { 8 | GENTLE, 9 | NORMAL, 10 | AGGRESSIVE, 11 | ATTENTIVE, 12 | VIOLENT, 13 | CRAFTY 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/id/sequences/entities/Planet.java: -------------------------------------------------------------------------------- 1 | // $Id: Planet.java 14785 2008-06-19 10:44:33Z hardy.ferentschik $ 2 | package org.hibernate.test.annotations.id.sequences.entities; 3 | 4 | 5 | public enum Planet { 6 | MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO; 7 | } 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/util/dtd/child.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/emops/Dress.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.emops; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Dress { 11 | @Id public String name; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/metadata/SimplePerson.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.jpa.test.metadata; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class SimplePerson { 10 | @Id 11 | String ssn; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/fkcircularity/C.java: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | package org.hibernate.test.annotations.fkcircularity; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * Test entities ANN-722. 7 | * 8 | * @author Hardy Ferentschik 9 | * 10 | */ 11 | @Entity 12 | public class C extends B { 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/ondelete/Address.java: -------------------------------------------------------------------------------- 1 | //$Id: Address.java 7119 2005-06-12 22:03:30Z oneovthafew $ 2 | package org.hibernate.test.ondelete; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Address { 9 | public String address; 10 | public String zip; 11 | public String country; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-proxool/src/test/resources/pool-one.properties: -------------------------------------------------------------------------------- 1 | jdbc-0.proxool.alias=pool-one 2 | jdbc-0.proxool.driver-url=jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE 3 | jdbc-0.proxool.driver-class=org.h2.Driver 4 | jdbc-0.user=sa 5 | jdbc-0.password= 6 | jdbc-0.proxool.maximum-connection-count=2 7 | jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE -------------------------------------------------------------------------------- /hibernate-proxool/src/test/resources/pool-two.properties: -------------------------------------------------------------------------------- 1 | jdbc-0.proxool.alias=pool-two 2 | jdbc-0.proxool.driver-url=jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE 3 | jdbc-0.proxool.driver-class=org.h2.Driver 4 | jdbc-0.user=sa 5 | jdbc-0.password= 6 | jdbc-0.proxool.maximum-connection-count=2 7 | jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/group_by_illustration.txt: -------------------------------------------------------------------------------- 1 | // retrieve the total for all orders 2 | select sum( o.total ) 3 | from Order o 4 | 5 | // retrieve the total of all orders 6 | // *grouped by* customer 7 | select c.id, sum( o.total ) 8 | from Order o 9 | inner join o.customer c 10 | group by c.id -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/cid/Presenter.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.cid; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Presenter { 11 | @Id 12 | public String name; 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/interfaces/User.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.interfaces; 3 | import java.util.Collection; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public interface User { 9 | Integer getId(); 10 | 11 | Collection getContacts(); 12 | 13 | 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-c3p0/hibernate-c3p0.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | provided( libraries.validation ) 3 | compile project( ':hibernate-core' ) 4 | compile( libraries.c3p0 ) 5 | 6 | testCompile( libraries.validator ) { 7 | // for test runtime 8 | transitive = true 9 | } 10 | testCompile project( ':hibernate-testing' ) 11 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e2/b/EmployeeId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e2.b; 2 | import java.io.Serializable; 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public class EmployeeId implements Serializable { 8 | String firstName; 9 | String lastName; 10 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e5/b/PersonId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e5.b; 2 | import java.io.Serializable; 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public class PersonId implements Serializable { 8 | String firstName; 9 | String lastName; 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/entitynonentity/Phone.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.entitynonentity; 3 | import javax.persistence.MappedSuperclass; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @MappedSuperclass 9 | public class Phone extends Voice { 10 | boolean isNumeric; 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/discriminator/Address.java: -------------------------------------------------------------------------------- 1 | //$Id: Address.java 4373 2004-08-18 09:18:34Z oneovthafew $ 2 | package org.hibernate.test.discriminator; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Address { 9 | public String address; 10 | public String zip; 11 | public String country; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/dynamicentity/Customer.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.dynamicentity; 2 | 3 | 4 | /** 5 | * @author Steve Ebersole 6 | */ 7 | public interface Customer extends Person { 8 | public Company getCompany(); 9 | public void setCompany(Company company); 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.envers.test.integration.interfaces.components; 2 | 3 | 4 | /** 5 | * @author Adam Warski (adam at warski dot org) 6 | */ 7 | public interface IComponent { 8 | String getData(); 9 | void setData(String data); 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e2/a/EmployeeId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e2.a; 2 | import java.io.Serializable; 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public class EmployeeId implements Serializable { 8 | String firstName; 9 | String lastName; 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e3/a/EmployeeId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e3.a; 2 | import java.io.Serializable; 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public class EmployeeId implements Serializable{ 8 | String firstName; 9 | String lastName; 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/joinedsubclass/Address.java: -------------------------------------------------------------------------------- 1 | //$Id: Address.java 4364 2004-08-17 12:10:32Z oneovthafew $ 2 | package org.hibernate.test.joinedsubclass; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Address { 9 | public String address; 10 | public String zip; 11 | public String country; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/joined/Person.java: -------------------------------------------------------------------------------- 1 | //$Id: Person.java 5686 2005-02-12 07:27:32Z steveebersole $ 2 | package org.hibernate.test.onetoone.joined; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Person extends Entity { 9 | public Address address; 10 | public Address mailingAddress; 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/unionsubclass2/Address.java: -------------------------------------------------------------------------------- 1 | //$Id: Address.java 7192 2005-06-18 14:40:15Z oneovthafew $ 2 | package org.hibernate.test.unionsubclass2; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Address { 9 | public String address; 10 | public String zip; 11 | public String country; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-envers/src/test/java/org/hibernate/envers/test/integration/inheritance/mixed/entities/Activity.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.envers.test.integration.inheritance.mixed.entities; 2 | 3 | import java.io.Serializable; 4 | 5 | public interface Activity extends Serializable { 6 | ActivityId getId(); 7 | 8 | Integer getSequenceNumber(); 9 | } 10 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/join_example_explicit_inner.txt: -------------------------------------------------------------------------------- 1 | select c 2 | from Customer c 3 | join c.chiefExecutive ceo 4 | where ceo.age < 25 5 | 6 | // same query but specifying join type as 'inner' explicitly 7 | select c 8 | from Customer c 9 | inner join c.chiefExecutive ceo 10 | where ceo.age < 25 11 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/multiple_root_entity_ref_example.txt: -------------------------------------------------------------------------------- 1 | // build a product between customers and active mailing campaigns so we can spam! 2 | select distinct cust, camp 3 | from Customer cust, Campaign camp 4 | where camp.type = 'mail' 5 | and current_timestamp() between camp.activeRange.start and camp.activeRange.end -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/from_join_example_plural.java: -------------------------------------------------------------------------------- 1 | CriteriaQuery personCriteria = builder.createQuery( Person.class ); 2 | Root personRoot = person.from( Person.class ); 3 | Join orders = personRoot.join( Person_.orders ); 4 | Join orderLines = orders.join( Order_.lineItems ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/agg_func_example.txt: -------------------------------------------------------------------------------- 1 | select count(*), sum( o.total ), avg( o.total ), min( o.total ), max( o.total ) 2 | from Order o 3 | 4 | select count( distinct c.name ) 5 | from Customer c 6 | 7 | select c.id, c.name, sum( o.total ) 8 | from Customer c 9 | left join c.orders o 10 | group by c.id, c.name -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/predicate_in_bnf.txt: -------------------------------------------------------------------------------- 1 | in_expression ::= single_valued_expression 2 | [NOT] IN single_valued_list 3 | 4 | single_valued_list ::= constructor_expression | 5 | (subquery) | 6 | collection_valued_input_parameter 7 | 8 | constructor_expression ::= (expression[, expression]*) -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e6/b/Person.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e6.b; 2 | import javax.persistence.EmbeddedId; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Person { 10 | @EmbeddedId 11 | PersonId id; 12 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/singletable/Person.java: -------------------------------------------------------------------------------- 1 | //$Id: Person.java 5686 2005-02-12 07:27:32Z steveebersole $ 2 | package org.hibernate.test.onetoone.singletable; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Person extends Entity { 9 | public Address address; 10 | public Address mailingAddress; 11 | } 12 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/timestamp_version.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e6/a/Person.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e6.a; 2 | import javax.persistence.EmbeddedId; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Person { 10 | @EmbeddedId 11 | PersonId id; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/id/Product.java: -------------------------------------------------------------------------------- 1 | //$Id: $ 2 | package org.hibernate.test.id; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Product { 9 | private String name; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/connection/FakeDataSourceException.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.connection; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class FakeDataSourceException extends RuntimeException { 9 | public FakeDataSourceException(String message) { 10 | super( message ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/from_fetch_example_plural.java: -------------------------------------------------------------------------------- 1 | CriteriaQuery<Person> personCriteria = builder.createQuery( Person.class ); 2 | Root personRoot = person.from( Person.class ); 3 | Fetch orders = personRoot.fetch( Person_.orders ); 4 | Fetch orderLines = orders.fetch( Order_.lineItems ); -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/nullif_example.txt: -------------------------------------------------------------------------------- 1 | // return customers who have changed their last name 2 | select nullif( c.previousName.last, c.name.last ) 3 | from Customer c 4 | 5 | // equivalent CASE expression 6 | select case when c.previousName.last = c.name.last then null 7 | else c.previousName.last end 8 | from Customer c 9 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/access/BigBed.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.access; 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class BigBed extends Bed { 11 | @Column(name="bed_size") 12 | public int size; 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e1/b/Employee.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e1.b; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Employee { 10 | @Id 11 | long empId; 12 | String empName; 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e1/c/Employee.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e1.c; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Employee { 10 | @Id 11 | long empId; 12 | String empName; 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e3/a/Employee.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e3.a; 2 | import javax.persistence.EmbeddedId; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Employee { 10 | @EmbeddedId 11 | EmployeeId empId; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/id/sequences/entities/FirTree.java: -------------------------------------------------------------------------------- 1 | //$Id: FirTree.java 14760 2008-06-11 07:33:15Z hardy.ferentschik $ 2 | package org.hibernate.test.annotations.id.sequences.entities; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class FirTree extends Tree { 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/idmanytoone/alphabetical/Service.java: -------------------------------------------------------------------------------- 1 | //$ 2 | package org.hibernate.test.annotations.idmanytoone.alphabetical; 3 | import java.math.BigInteger; 4 | import javax.persistence.Entity; 5 | import javax.persistence.Id; 6 | 7 | 8 | @Entity 9 | public class Service { 10 | @Id 11 | private BigInteger idpk; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Dog.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.lob; 2 | import java.io.Serializable; 3 | 4 | public class Dog implements Serializable { 5 | private String name; 6 | 7 | public String getName() { 8 | return name; 9 | } 10 | 11 | public void setName(String name) { 12 | this.name = name; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/CacheCommandIds.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.cache.infinispan.util; 2 | 3 | /** 4 | * Command id range assigned to Hibernate second level cache: 120 - 139 5 | * 6 | * @author Galder Zamarreño 7 | * @since 4.0 8 | */ 9 | public interface CacheCommandIds { 10 | 11 | byte EVICT_ALL = 120; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/criteria/VersionedRecord.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.criteria; 2 | 3 | import javax.persistence.MappedSuperclass; 4 | 5 | /** 6 | * @author Strong Liu 7 | */ 8 | @MappedSuperclass 9 | abstract class VersionedRecord implements java.io.Serializable { 10 | Long recordVersion; 11 | Boolean isDeleted; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/dynamicentity/Company.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.dynamicentity; 2 | 3 | 4 | /** 5 | * @author Steve Ebersole 6 | */ 7 | public interface Company { 8 | public Long getId(); 9 | public void setId(Long id); 10 | public String getName(); 11 | public void setName(String name); 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/AbstractProxy.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.legacy; 2 | 3 | 4 | public interface AbstractProxy extends FooProxy { 5 | public void setAbstracts(java.util.Set arg0); 6 | public java.util.Set getAbstracts(); 7 | public void setTime(java.sql.Time arg0); 8 | public java.sql.Time getTime(); 9 | } 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/singletable/Org.java: -------------------------------------------------------------------------------- 1 | //$Id: Org.java 5686 2005-02-12 07:27:32Z steveebersole $ 2 | package org.hibernate.test.onetoone.singletable; 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | /** 7 | * @author Gavin King 8 | */ 9 | public class Org extends Entity { 10 | public Set addresses = new HashSet(); 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-testing/hibernate-testing.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project( ':hibernate-core' ) 3 | compile( libraries.junit ) 4 | compile( libraries.byteman ) 5 | compile( libraries.byteman_install ) 6 | compile( libraries.byteman_bmunit ) 7 | compile( libraries.xapool ) 8 | compile ( libraries.jboss_jta ) { 9 | transitive=false; 10 | } 11 | } -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/map_dynamic_instantiation_example.txt: -------------------------------------------------------------------------------- 1 | select new map( mother as mother, offspr as offspr, mate as mate ) 2 | from DomesticCat as mother 3 | inner join mother.mate as mate 4 | left outer join mother.kittens as offspr 5 | 6 | select new map( max(c.bodyWeight) as max, min(c.bodyWeight) as min, count(*) as n ) 7 | from Cat c -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/predicate_like_example.txt: -------------------------------------------------------------------------------- 1 | select p 2 | from Person p 3 | where p.name like '%Schmidt' 4 | 5 | select p 6 | from Person p 7 | where p.name not like 'Jingleheimmer%' 8 | 9 | // find any with name starting with "sp_" 10 | select sp 11 | from StoredProcedureMetadata sp 12 | where sp.name like 'sp|_%' escape '|' 13 | 14 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/statement_update_example_hql.java: -------------------------------------------------------------------------------- 1 | String hqlUpdate = 2 | "update Customer c " + 3 | "set c.name = :newName " + 4 | "where c.name = :oldName"; 5 | int updatedEntities = session.createQuery( hqlUpdate ) 6 | .setString( "newName", newName ) 7 | .setString( "oldName", oldName ) 8 | .executeUpdate(); 9 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/hql-insert.java: -------------------------------------------------------------------------------- 1 | Session session = sessionFactory.openSession(); 2 | Transaction tx = session.beginTransaction(); 3 | 4 | String hqlInsert = "insert into DelinquentAccount (id, name) select c.id, c.name from Customer c where ..."; 5 | int createdEntities = s.createQuery( hqlInsert ) 6 | .executeUpdate(); 7 | tx.commit(); 8 | session.close(); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e3/b/Employee.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e3.b; 2 | import javax.persistence.EmbeddedId; 3 | import javax.persistence.Entity; 4 | 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Employee { 11 | @EmbeddedId 12 | EmployeeId empId; 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/reflection/SocialSecurityPhysicalAccount.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.reflection; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class SocialSecurityPhysicalAccount { 10 | public String number; 11 | public String countryCode; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/org/hibernate/test/annotations/configuration/orm.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/singletable/Address.java: -------------------------------------------------------------------------------- 1 | //$Id: Address.java 5686 2005-02-12 07:27:32Z steveebersole $ 2 | package org.hibernate.test.onetoone.singletable; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Address { 9 | public String entityName; 10 | public String street; 11 | public String state; 12 | public String zip; 13 | } 14 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/statement_update_example_jpql.java: -------------------------------------------------------------------------------- 1 | String jpqlUpdate = 2 | "update Customer c " + 3 | "set c.name = :newName " + 4 | "where c.name = :oldName"; 5 | int updatedEntities = entityManager.createQuery( jpqlUpdate ) 6 | .setString( "newName", newName ) 7 | .setString( "oldName", oldName ) 8 | .executeUpdate(); 9 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/inheritance/singletable/Noise.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.inheritance.singletable; 3 | import javax.persistence.DiscriminatorValue; 4 | import javax.persistence.Entity; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | @DiscriminatorValue("0") 11 | public class Noise extends Music { 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/inheritance/singletable/Rock.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.inheritance.singletable; 3 | import javax.persistence.DiscriminatorValue; 4 | import javax.persistence.Entity; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | @DiscriminatorValue("2") 11 | public class Rock extends Music { 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/query/SynonymousDictionary.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.query; 3 | import javax.persistence.DiscriminatorValue; 4 | import javax.persistence.Entity; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | @DiscriminatorValue("Syn") 11 | public class SynonymousDictionary extends Dictionary { 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/Z.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.xml.hbm; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public interface Z extends java.io.Serializable { 9 | public Integer getZId(); 10 | 11 | public void setZId(Integer zId); 12 | 13 | public B getB(); 14 | 15 | public void setB(B b); 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/array/B.java: -------------------------------------------------------------------------------- 1 | //$Id: B.java 6527 2005-04-26 16:58:52Z oneovthafew $ 2 | package org.hibernate.test.array; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class B { 9 | private Integer id; 10 | 11 | public Integer getId() { 12 | return id; 13 | } 14 | 15 | public void setId(Integer id) { 16 | this.id = id; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/cid/Channel.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.cid; 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | public class Channel { 12 | @Id 13 | @GeneratedValue 14 | public Integer id; 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e2/b/DependentId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e2.b; 2 | import java.io.Serializable; 3 | import javax.persistence.Embeddable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Embeddable 9 | public class DependentId implements Serializable { 10 | String name; 11 | EmployeeId empPK; 12 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e6/b/PersonId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e6.b; 2 | import java.io.Serializable; 3 | import javax.persistence.Embeddable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Embeddable 9 | public class PersonId implements Serializable { 10 | String firstName; 11 | String lastName; 12 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/embedded/URLFavorite.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.embedded; 2 | import javax.persistence.Embeddable; 3 | 4 | @Embeddable 5 | public class URLFavorite { 6 | 7 | private String url; 8 | 9 | public String getUrl() { 10 | return url; 11 | } 12 | 13 | public void setUrl(String url) { 14 | this.url = url; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/inheritance/singletable/House.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.inheritance.singletable; 3 | import javax.persistence.DiscriminatorValue; 4 | import javax.persistence.Entity; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | @DiscriminatorValue("H") 11 | public class House extends Building { 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/K.java: -------------------------------------------------------------------------------- 1 | //$Id: K.java 7203 2005-06-19 02:01:05Z oneovthafew $ 2 | package org.hibernate.test.legacy; 3 | import java.util.Set; 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class K { 9 | private Long id; 10 | private Set is; 11 | void setIs(Set is) { 12 | this.is = is; 13 | } 14 | Set getIs() { 15 | return is; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/cascade/Author.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.cascade; 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | public class Author { 12 | @Id @GeneratedValue 13 | private Long id; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/instrument/Simple.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.instrument; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Simple { 9 | private String name; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/statement_update_example_hql_versioned.java: -------------------------------------------------------------------------------- 1 | String hqlVersionedUpdate = 2 | "update versioned Customer c " + 3 | "set c.name = :newName " + 4 | "where c.name = :oldName"; 5 | int updatedEntities = s.createQuery( hqlUpdate ) 6 | .setString( "newName", newName ) 7 | .setString( "oldName", oldName ) 8 | .executeUpdate(); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e5/c/Person.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e5.c; 2 | import javax.persistence.Entity; 3 | import javax.persistence.GeneratedValue; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Person { 11 | @Id @GeneratedValue 12 | Integer id; 13 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e6/a/PersonId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e6.a; 2 | import java.io.Serializable; 3 | import javax.persistence.Embeddable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Embeddable 9 | public class PersonId implements Serializable { 10 | String firstName; 11 | String lastName; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/override/PropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.override; 2 | import java.math.BigDecimal; 3 | import javax.persistence.Embeddable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Embeddable 9 | public class PropertyInfo { 10 | public Integer parcelNumber; 11 | public Integer size; 12 | public BigDecimal tax; 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/cut/types.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/CheckingLazinessWithHibernate.java: -------------------------------------------------------------------------------- 1 | if ( Hibernate.isInitialized( customer.getAddress() ) { 2 | //display address if loaded 3 | } 4 | if ( Hibernate.isInitialized( customer.getOrders()) ) ) { 5 | //display orders if loaded 6 | } 7 | if (Hibernate.isPropertyInitialized( customer, "detailedBio" ) ) { 8 | //display property detailedBio if loaded 9 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/xml/mocker/IndexBuilderTest.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.metamodel.source.annotations.xml.mocker; 2 | 3 | import org.junit.Test; 4 | 5 | /** 6 | * @author Strong Liu 7 | */ 8 | public class IndexBuilderTest extends AbstractMockerTest { 9 | @Test 10 | public void test() { 11 | IndexBuilder builder = getIndexBuilder(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e3/b/DependentId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e3.b; 2 | import java.io.Serializable; 3 | import javax.persistence.Embeddable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Embeddable 9 | public class DependentId implements Serializable { 10 | String name; 11 | EmployeeId empPK; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e3/b/EmployeeId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e3.b; 2 | import java.io.Serializable; 3 | import javax.persistence.Embeddable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Embeddable 9 | public class EmployeeId implements Serializable { 10 | String firstName; 11 | String lastName; 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/entitynonentity/Interaction.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.entitynonentity; 3 | import javax.persistence.Column; 4 | import javax.persistence.MappedSuperclass; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @MappedSuperclass 10 | public class Interaction { 11 | @Column(name="int_nbr") 12 | public int number; 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/event/collection/Entity.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.event.collection; 2 | 3 | 4 | /** 5 | * Created by IntelliJ IDEA. 6 | * User: gbadner 7 | * Date: Jan 30, 2008 8 | * Time: 2:39:37 PM 9 | * To change this template use File | Settings | File Templates. 10 | */ 11 | public interface Entity { 12 | Long getId(); 13 | 14 | void setId(Long id); 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/J.java: -------------------------------------------------------------------------------- 1 | //$Id: J.java 7203 2005-06-19 02:01:05Z oneovthafew $ 2 | package org.hibernate.test.legacy; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class J extends I { 9 | private float amount; 10 | 11 | void setAmount(float amount) { 12 | this.amount = amount; 13 | } 14 | 15 | float getAmount() { 16 | return amount; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/Nameable.java: -------------------------------------------------------------------------------- 1 | //$Id: Nameable.java 4599 2004-09-26 05:18:27Z oneovthafew $ 2 | package org.hibernate.test.legacy; 3 | 4 | 5 | /** 6 | * 7 | */ 8 | public interface Nameable { 9 | public String getName(); 10 | public void setName(String name); 11 | public Long getKey(); 12 | public void setKey(Long key); 13 | } 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/StringComparator.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.legacy; 2 | import java.io.Serializable; 3 | import java.util.Comparator; 4 | 5 | public class StringComparator implements Comparator, Serializable { 6 | 7 | public int compare(Object o1, Object o2) { 8 | return ( (String) o1 ).toLowerCase().compareTo( ( (String) o2 ).toLowerCase() ); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/optional/Address.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.onetoone.optional; 2 | 3 | 4 | /** 5 | * @author Gavin King 6 | */ 7 | public class Address { 8 | public String entityName; 9 | public String street; 10 | public String state; 11 | public String zip; 12 | 13 | public String toString() { 14 | return this.getClass() + ":" + street; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-ehcache/src/test/resources/hibernate-config/ehcache.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/callbacks/ExceptionListener.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.callbacks; 3 | import javax.persistence.PrePersist; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class ExceptionListener { 9 | @PrePersist 10 | public void raiseException(Object e) { 11 | throw new ArithmeticException( "1/0 impossible" ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/various/Seat.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.pack.various; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Seat { 9 | private String number; 10 | 11 | public String getNumber() { 12 | return number; 13 | } 14 | 15 | public void setNumber(String number) { 16 | this.number = number; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/version_property.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/typeparameters/Typedef.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | -1 8 | 9 | 10 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/resources/org/hibernate/jpa/test/mapping/orm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/namingstrategy/DummyNamingStrategy.java: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | package org.hibernate.test.annotations.namingstrategy; 3 | import org.hibernate.cfg.EJB3NamingStrategy; 4 | 5 | @SuppressWarnings("serial") 6 | public class DummyNamingStrategy extends EJB3NamingStrategy { 7 | 8 | public String tableName(String tableName) { 9 | return "T" + tableName; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/MyNamingStrategy.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test; 3 | import org.hibernate.cfg.EJB3NamingStrategy; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class MyNamingStrategy extends EJB3NamingStrategy { 9 | @Override 10 | public String tableName(String tableName) { 11 | return "tbl_" + super.tableName( tableName ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/fr-FR/content/quickstart.po: -------------------------------------------------------------------------------- 1 | #, fuzzy 2 | msgid "" 3 | msgstr "" 4 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 5 | "Last-Translator: FULL NAME \n" 6 | "Content-Type: text/plain; charset=utf-8\n" 7 | msgid "ROLES_OF_TRANSLATORS" 8 | msgstr "" 9 | 10 | msgid "CREDIT_FOR_TRANSLATORS" 11 | msgstr "" 12 | 13 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/ja-JP/content/quickstart.po: -------------------------------------------------------------------------------- 1 | #, fuzzy 2 | msgid "" 3 | msgstr "" 4 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 5 | "Last-Translator: FULL NAME \n" 6 | "Content-Type: text/plain; charset=utf-8\n" 7 | msgid "ROLES_OF_TRANSLATORS" 8 | msgstr "" 9 | 10 | msgid "CREDIT_FOR_TRANSLATORS" 11 | msgstr "" 12 | 13 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/pt-BR/content/quickstart.po: -------------------------------------------------------------------------------- 1 | #, fuzzy 2 | msgid "" 3 | msgstr "" 4 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 5 | "Last-Translator: FULL NAME \n" 6 | "Content-Type: text/plain; charset=utf-8\n" 7 | msgid "ROLES_OF_TRANSLATORS" 8 | msgstr "" 9 | 10 | msgid "CREDIT_FOR_TRANSLATORS" 11 | msgstr "" 12 | 13 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/manual/zh-CN/content/quickstart.po: -------------------------------------------------------------------------------- 1 | #, fuzzy 2 | msgid "" 3 | msgstr "" 4 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 5 | "Last-Translator: FULL NAME \n" 6 | "Content-Type: text/plain; charset=utf-8\n" 7 | msgid "ROLES_OF_TRANSLATORS" 8 | msgstr "" 9 | 10 | msgid "CREDIT_FOR_TRANSLATORS" 11 | msgstr "" 12 | 13 | -------------------------------------------------------------------------------- /hibernate-envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.envers.test.integration.interfaces.relation; 2 | 3 | 4 | /** 5 | * @author Adam Warski (adam at warski dot org) 6 | */ 7 | public interface ISetRefEdEntity { 8 | Integer getId(); 9 | 10 | void setId(Integer id); 11 | 12 | String getData(); 13 | 14 | void setData(String data); 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/tuplizer/Country.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.tuplizer; 3 | import javax.persistence.Column; 4 | import javax.persistence.Embeddable; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Embeddable 10 | public interface Country { 11 | @Column(name = "CountryName") 12 | public String getName(); 13 | public void setName(String name); 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/cfg/cache/SubClass.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.cfg.cache; 2 | 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | public class SubClass extends BaseClass { 7 | Set items = new HashSet(); 8 | 9 | public Set getItems() { 10 | return items; 11 | } 12 | 13 | public void setItems(Set items) { 14 | this.items = items; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/Down.java: -------------------------------------------------------------------------------- 1 | //$Id: Down.java 4599 2004-09-26 05:18:27Z oneovthafew $ 2 | package org.hibernate.test.legacy; 3 | 4 | 5 | 6 | /** 7 | * @author Gavin King 8 | */ 9 | public class Down extends Up { 10 | 11 | private long value; 12 | 13 | public long getValue() { 14 | return value; 15 | } 16 | 17 | public void setValue(long l) { 18 | value = l; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/Drug.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.legacy; 2 | 3 | 4 | /** 5 | * @author hbm2java 6 | */ 7 | public class Drug extends org.hibernate.test.legacy.Resource { 8 | 9 | java.lang.String id; 10 | 11 | 12 | java.lang.String getId() { 13 | return id; 14 | } 15 | 16 | void setId(java.lang.String newValue) { 17 | id = newValue; 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/cfg/persister/Tree.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.cfg.persister; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Tree { 11 | @Id 12 | public Long getId() { return id; } 13 | public void setId(Long id) { this.id = id; } 14 | private Long id; 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e1/b/DependentId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e1.b; 2 | import java.io.Serializable; 3 | import javax.persistence.Embeddable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Embeddable 9 | public class DependentId implements Serializable { 10 | String name; 11 | long empPK; // corresponds to PK type of Employee 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/Gas.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.indexcoll; 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | public class Gas { 12 | @Id 13 | @GeneratedValue 14 | public Integer id; 15 | public String name; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/legacy/NestingComponent.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.legacy; 2 | import java.io.Serializable; 3 | 4 | public class NestingComponent implements Serializable { 5 | private ComponentCollection nested; 6 | public ComponentCollection getNested() { 7 | return nested; 8 | } 9 | 10 | public void setNested(ComponentCollection collection) { 11 | nested = collection; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/NoOpListener.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test; 3 | import org.hibernate.event.spi.PreInsertEvent; 4 | import org.hibernate.event.spi.PreInsertEventListener; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | public class NoOpListener implements PreInsertEventListener { 10 | public boolean onPreInsert(PreInsertEvent event) { 11 | return false; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-c3p0/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 2 | log4j.appender.stdout.Target=System.out 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n 5 | 6 | 7 | log4j.rootLogger=info, stdout 8 | 9 | log4j.logger.org.hibernate.tool.hbm2ddl=debug 10 | log4j.logger.org.hibernate.testing.cache=debug 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/Ferry.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations; 3 | import javax.persistence.Entity; 4 | 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity() 10 | public class Ferry extends Boat { 11 | private String sea; 12 | 13 | public String getSea() { 14 | return sea; 15 | } 16 | 17 | public void setSea(String string) { 18 | sea = string; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/IncorrectEntity.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class IncorrectEntity { 10 | private String name; 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e2/a/Employee.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e2.a; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | import javax.persistence.IdClass; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | @IdClass(EmployeeId.class) 11 | public class Employee { 12 | @Id String firstName; 13 | @Id String lastName; 14 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e4/a/Simple.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e4.a; 2 | import java.io.Serializable; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Simple 11 | implements Serializable { 12 | @Id 13 | String ssn; 14 | @Id 15 | String name; 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/lob/Editor.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.lob; 3 | import java.io.Serializable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Editor implements Serializable { 9 | private String name; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/bmt-idiom.java: -------------------------------------------------------------------------------- 1 | // BMT idiom 2 | Session sess = factory.openSession(); 3 | Transaction tx = null; 4 | try { 5 | tx = sess.beginTransaction(); 6 | 7 | // do some work 8 | ... 9 | 10 | tx.commit(); 11 | } 12 | 13 | catch (RuntimeException e) { 14 | if (tx != null) tx.rollback(); 15 | throw e; // or display error message 16 | } 17 | 18 | finally { 19 | sess.close(); 20 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/cid/OrderLine.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.cid; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | import javax.persistence.IdClass; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | @IdClass(OrderLinePk.class) 11 | public class OrderLine { 12 | @Id 13 | public Order order; 14 | @Id 15 | public Product product; 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e3/a/DependentId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e3.a; 2 | import java.io.Serializable; 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public class DependentId implements Serializable { 8 | String name; // matches name of @Id attribute 9 | EmployeeId emp; // matches name of @Id attribute and type of embedded id of Employee 10 | } 11 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/DomesticAnimal.java: -------------------------------------------------------------------------------- 1 | //$Id: DomesticAnimal.java 4899 2004-12-06 14:17:24Z pgmjsd $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class DomesticAnimal extends Mammal { 9 | private Human owner; 10 | 11 | public Human getOwner() { 12 | return owner; 13 | } 14 | 15 | public void setOwner(Human owner) { 16 | this.owner = owner; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/callbacks/IncreaseListener.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.callbacks; 3 | import javax.persistence.PreUpdate; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class IncreaseListener { 9 | @PreUpdate 10 | public void increate(CommunicationSystem object) { 11 | object.communication++; 12 | object.isFirst = false; 13 | object.isLast = false; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e4/a/Person.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e4.a; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Person { 10 | @Id 11 | String ssn; 12 | 13 | public Person() { 14 | } 15 | 16 | public Person(String ssn) { 17 | this.ssn = ssn; 18 | } 19 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e4/b/Person.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e4.b; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Person { 10 | @Id 11 | String ssn; 12 | 13 | public Person() { 14 | } 15 | 16 | public Person(String ssn) { 17 | this.ssn = ssn; 18 | } 19 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/cfg/cache/Item.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.cfg.cache; 2 | 3 | public class Item { 4 | Long id; 5 | 6 | String name; 7 | 8 | public Long getId() { 9 | return id; 10 | } 11 | 12 | public void setId(Long id) { 13 | this.id = id; 14 | } 15 | 16 | public String getName() { 17 | return name; 18 | } 19 | 20 | public void setName(String name) { 21 | this.name = name; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hibernate-ehcache/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 2 | log4j.appender.stdout.Target=System.out 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n 5 | 6 | log4j.rootLogger=info, stdout 7 | 8 | log4j.logger.org.hibernate.test=info 9 | 10 | # SQL Logging - HHH-6833 11 | log4j.logger.org.hibernate.SQL=debug -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/specifying_configuration_properties_programmatically.java: -------------------------------------------------------------------------------- 1 | Configuration cfg = new Configuration() 2 | .addClass(org.hibernate.auction.Item.class) 3 | .addClass(org.hibernate.auction.Bid.class) 4 | .setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLInnoDBDialect") 5 | .setProperty("hibernate.connection.datasource", "java:comp/env/jdbc/test") 6 | .setProperty("hibernate.order_updates", "true"); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/Thing.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations; 3 | import javax.persistence.MappedSuperclass; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @MappedSuperclass 9 | public class Thing { 10 | private boolean isAlive; 11 | 12 | public boolean isAlive() { 13 | return isAlive; 14 | } 15 | 16 | public void setAlive(boolean alive) { 17 | isAlive = alive; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/bytecode/Hammer.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.bytecode; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Hammer implements Tool { 9 | private Long id; 10 | 11 | public Long getId() { 12 | return id; 13 | } 14 | 15 | public void setId(Long id) { 16 | this.id = id; 17 | } 18 | 19 | public Integer usage() { 20 | return 0; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e2/b/Employee.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e2.b; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | import javax.persistence.IdClass; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | @IdClass(EmployeeId.class) 11 | public class Employee { 12 | @Id 13 | String firstName; 14 | @Id 15 | String lastName; 16 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e5/b/Person.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e5.b; 2 | import javax.persistence.Entity; 3 | import javax.persistence.Id; 4 | import javax.persistence.IdClass; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | @IdClass(PersonId.class) 11 | public class Person { 12 | @Id 13 | String firstName; 14 | @Id 15 | String lastName; 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/idmanytoone/alphabetical/Benefserv.java: -------------------------------------------------------------------------------- 1 | //$ 2 | package org.hibernate.test.annotations.idmanytoone.alphabetical; 3 | import java.math.BigInteger; 4 | import javax.persistence.Entity; 5 | import javax.persistence.Id; 6 | import javax.persistence.ManyToOne; 7 | 8 | @Entity 9 | public class Benefserv { 10 | @Id 11 | private BigInteger idpk; 12 | 13 | @ManyToOne 14 | private Service idpkser; 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/TrousersZip.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.onetoone; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | import javax.persistence.OneToOne; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | public class TrousersZip { 12 | @Id 13 | public Integer id; 14 | @OneToOne(mappedBy = "zip") 15 | public Trousers trousers; 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/joinfetch/Category.java: -------------------------------------------------------------------------------- 1 | //$Id: Category.java 6957 2005-05-31 04:21:58Z oneovthafew $ 2 | package org.hibernate.test.joinfetch; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Category { 9 | 10 | private String name; 11 | 12 | Category() {} 13 | 14 | public Category(String name) { 15 | this.name = name; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/pack/various/Airplane.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.pack.various; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Airplane { 9 | private String serialNumber; 10 | 11 | public String getSerialNumber() { 12 | return serialNumber; 13 | } 14 | 15 | public void setSerialNumber(String serialNumber) { 16 | this.serialNumber = serialNumber; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/searched_case_exp_example.txt: -------------------------------------------------------------------------------- 1 | select case when c.name.first is not null then c.name.first 2 | when c.nickName is not null then c.nickName 3 | else '' end 4 | from Customer c 5 | 6 | // Again, the abbreviated form coalesce can handle this a 7 | // little more succinctly 8 | select coalesce( c.name.first, c.nickName, '' ) 9 | from Customer c 10 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/hibernate.properties: -------------------------------------------------------------------------------- 1 | hibernate.connection.driver_class = org.postgresql.Driver 2 | hibernate.connection.url = jdbc:postgresql://localhost/mydatabase 3 | hibernate.connection.username = myuser 4 | hibernate.connection.password = secret 5 | hibernate.c3p0.min_size=5 6 | hibernate.c3p0.max_size=20 7 | hibernate.c3p0.timeout=1800 8 | hibernate.c3p0.max_statements=50 9 | hibernate.dialect = org.hibernate.dialect.PostgreSQL82Dialect -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/hql_delete.java: -------------------------------------------------------------------------------- 1 | Session session = sessionFactory.openSession(); 2 | Transaction tx = session.beginTransaction(); 3 | 4 | String hqlDelete = "delete Customer c where c.name = :oldName"; 5 | // or String hqlDelete = "delete Customer where name = :oldName"; 6 | int deletedEntities = s.createQuery( hqlDelete ) 7 | .setString( "oldName", oldName ) 8 | .executeUpdate(); 9 | tx.commit(); 10 | session.close(); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/idmanytoone/alphabetical/Droitacces.java: -------------------------------------------------------------------------------- 1 | //$ 2 | package org.hibernate.test.annotations.idmanytoone.alphabetical; 3 | import java.math.BigInteger; 4 | import javax.persistence.Entity; 5 | import javax.persistence.Id; 6 | import javax.persistence.ManyToOne; 7 | 8 | @Entity 9 | public class Droitacces { 10 | @Id 11 | private BigInteger idpk; 12 | 13 | @ManyToOne 14 | private Benefserv idpkbenef; 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/cfg/cache/BaseClass.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.cfg.cache; 2 | 3 | public class BaseClass { 4 | Long id; 5 | String value; 6 | 7 | public Long getId() { 8 | return id; 9 | } 10 | 11 | public void setId(Long id) { 12 | this.id = id; 13 | } 14 | 15 | public String getValue() { 16 | return value; 17 | } 18 | 19 | public void setValue(String value) { 20 | this.value = value; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/ops/Mammal.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.ops; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Mammal extends Animal { 10 | private int mamalNbr; 11 | 12 | public int getMamalNbr() { 13 | return mamalNbr; 14 | } 15 | 16 | public void setMamalNbr(int mamalNbr) { 17 | this.mamalNbr = mamalNbr; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/select_root_entity_example.java: -------------------------------------------------------------------------------- 1 | CriteriaQuery criteria = builder.createQuery( Person.class ); 2 | Root personRoot = criteria.from( Person.class ); 3 | criteria.select( personRoot ); 4 | criteria.where( builder.equal( personRoot.get( Person_.eyeColor ), "brown" ) ); 5 | 6 | List people = em.createQuery( criteria ).getResultList(); 7 | for ( Person person : people ) { 8 | ... 9 | } -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/updating_version.java: -------------------------------------------------------------------------------- 1 | Session session = sessionFactory.openSession(); 2 | Transaction tx = session.beginTransaction(); 3 | String hqlVersionedUpdate = "update versioned Customer set name = :newName where name = :oldName"; 4 | int updatedEntities = s.createQuery( hqlUpdate ) 5 | .setString( "newName", newName ) 6 | .setString( "oldName", oldName ) 7 | .executeUpdate(); 8 | tx.commit(); 9 | session.close(); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/cid/Order.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.cid; 2 | import javax.persistence.Entity; 3 | import javax.persistence.GeneratedValue; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | @Table(name = "OrderTableFoobar") 12 | public class Order { 13 | @Id 14 | @GeneratedValue 15 | public Integer id; 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/tableperclass/Robot.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.tableperclass; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Robot extends Machine { 10 | private String name; 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/idclass/FavoriteCustomer.java: -------------------------------------------------------------------------------- 1 | //$Id: FavoriteCustomer.java 7858 2005-08-11 21:46:58Z epbernard $ 2 | package org.hibernate.test.idclass; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class FavoriteCustomer extends Customer { 9 | public FavoriteCustomer() { 10 | } 11 | 12 | public FavoriteCustomer(String orgName, String custName, String add) { 13 | super( orgName, custName, add ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/propertyref/inheritence/union/Customer.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.propertyref.inheritence.union; 2 | 3 | 4 | /** 5 | * @author Gavin King 6 | */ 7 | public class Customer extends Person { 8 | private String customerId; 9 | 10 | public String getCustomerId() { 11 | return customerId; 12 | } 13 | 14 | public void setCustomerId(String customerId) { 15 | this.customerId = customerId; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/unionsubclass/Employee.java: -------------------------------------------------------------------------------- 1 | //$Id: Employee.java 6673 2005-05-03 22:59:24Z epbernard $ 2 | package org.hibernate.test.unionsubclass; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Employee extends Human { 9 | private Double salary; 10 | 11 | public Double getSalary() { 12 | return salary; 13 | } 14 | 15 | public void setSalary(Double salary) { 16 | this.salary = salary; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-envers/src/test/java/org/hibernate/envers/test/performance/AllPerformance.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.envers.test.performance; 2 | import java.io.IOException; 3 | 4 | public class AllPerformance { 5 | public static void main(String[] args) throws IOException { 6 | new InsertsPerformance().test(10); 7 | new ComplexInsertPerformance().test(10); 8 | new UpdatesPerformance().test(10); 9 | new InsertsOneTransactionPerformance().test(10); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/collection_reference_example.txt: -------------------------------------------------------------------------------- 1 | select c 2 | from Customer c 3 | join c.orders o 4 | join o.lineItems l 5 | join l.product p 6 | where o.status = 'pending' 7 | and p.status = 'backorder' 8 | 9 | // alternate syntax 10 | select c 11 | from Customer c, 12 | in(c.orders) o, 13 | in(o.lineItems) l 14 | join l.product p 15 | where o.status = 'pending' 16 | and p.status = 'backorder' -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/id/entities/GoalKeeper.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.id.entities; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class GoalKeeper extends Footballer { 10 | public GoalKeeper() { 11 | } 12 | 13 | public GoalKeeper(String firstname, String lastname, String club) { 14 | super( firstname, lastname, club ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/id/entities/Tower.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.id.entities; 3 | import javax.persistence.AttributeOverride; 4 | import javax.persistence.Column; 5 | import javax.persistence.Entity; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | @AttributeOverride(name = "longitude", column = @Column(name = "fld_longitude")) 12 | public class Tower extends MilitaryBuilding { 13 | } 14 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/Heart.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.onetoone; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Heart { 11 | private Integer id; 12 | 13 | @Id 14 | public Integer getId() { 15 | return id; 16 | } 17 | 18 | public void setId(Integer id) { 19 | this.id = id; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/Folder.java: -------------------------------------------------------------------------------- 1 | //$Id: Folder.java 4407 2004-08-22 01:20:08Z oneovthafew $ 2 | package org.hibernate.test.interfaceproxy; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public interface Folder extends Item { 9 | /** 10 | * @return Returns the parent. 11 | */ 12 | public Folder getParent(); 13 | 14 | /** 15 | * @param parent The parent to set. 16 | */ 17 | public void setParent(Folder parent); 18 | } -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/select_attribute_example.java: -------------------------------------------------------------------------------- 1 | CriteriaQuery criteria = builder.createQuery( Integer.class ); 2 | Root personRoot = criteria.from( Person.class ); 3 | criteria.select( personRoot.get( Person_.age ) ); 4 | criteria.where( builder.equal( personRoot.get( Person_.eyeColor ), "brown" ) ); 5 | 6 | List ages = em.createQuery( criteria ).getResultList(); 7 | for ( Integer age : ages ) { 8 | ... 9 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/duplicatedgenerator/Flight.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.duplicatedgenerator; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | 7 | /** 8 | * Here to test duplicate import 9 | * 10 | * @author Emmanuel Bernard 11 | */ 12 | @Entity 13 | @Table(name = "tbl_flight") 14 | public class Flight { 15 | @Id 16 | public String id; 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/referencedcolumnname/Item.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.referencedcolumnname; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Item { 11 | int id; 12 | 13 | @Id 14 | public int getId() { 15 | return id; 16 | } 17 | 18 | public void setId(int id) { 19 | this.id = id; 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/iterate/Item.java: -------------------------------------------------------------------------------- 1 | //$Id: Item.java 6593 2005-04-28 15:52:26Z oneovthafew $ 2 | package org.hibernate.test.iterate; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Item { 9 | private String name; 10 | Item() {} 11 | public Item(String n) { 12 | name = n; 13 | } 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName(String name) { 19 | this.name = name; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/org/hibernate/metamodel/source/annotations/xml/mocker/default-schema2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | org.hibernate.metamodel.source.annotations.xml.mocker 7 | XML_SCHEMA 8 | XML_CATALOG 9 | 10 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/CheckingLazinessWithJPA2.java: -------------------------------------------------------------------------------- 1 | javax.persistence.PersistenceUtil jpaUtil = javax.persistence.Persistence.getPersistenceUtil(); 2 | if ( jpaUtil.isLoaded( customer.getAddress() ) { 3 | //display address if loaded 4 | } 5 | if ( jpaUtil.isLoaded( customer.getOrders()) ) ) { 6 | //display orders if loaded 7 | } 8 | if (jpaUtil.isLoaded(customer, "detailedBio") ) { 9 | //display property detailedBio if loaded 10 | } -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/from_join_example_embedded_and_many2one.java: -------------------------------------------------------------------------------- 1 | CriteriaQuery personCriteria = builder.createQuery( Person.class ); 2 | Root personRoot = person.from( Person.class ); 3 | // Person.address is an embedded attribute 4 | Join personAddress = personRoot.join( Person_.address ); 5 | // Address.country is a ManyToOne 6 | Join addressCountry = personAddress.join( Address_.country ); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/abstractembeddedcomponents/propertyref/Address.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.abstractembeddedcomponents.propertyref; 2 | 3 | 4 | /** 5 | * @author Steve Ebersole 6 | */ 7 | public interface Address { 8 | public Long getId(); 9 | public void setId(Long id); 10 | public String getAddressType(); 11 | public void setAddressType(String addressType); 12 | public Server getServer(); 13 | public void setServer(Server server); 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/GasKey.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.indexcoll; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class GasKey { 11 | @Id private String name; 12 | 13 | public String getName() { 14 | return name; 15 | } 16 | 17 | public void setName(String name) { 18 | this.name = name; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/reflection/Organization.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.reflection; 3 | 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class Organization { 9 | private String organizationId; 10 | 11 | public String getOrganizationId() { 12 | return organizationId; 13 | } 14 | 15 | public void setOrganizationId(String organizationId) { 16 | this.organizationId = organizationId; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/onetoone/joined/Address.java: -------------------------------------------------------------------------------- 1 | //$Id: Address.java 9914 2006-05-09 09:37:18Z max.andersen@jboss.com $ 2 | package org.hibernate.test.onetoone.joined; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Address { 9 | public String entityName; 10 | public String street; 11 | public String state; 12 | public String zip; 13 | 14 | public String toString() { 15 | return this.getClass() + ":" + street; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.envers.test.integration.interfaces.hbm.allAudited; 2 | import org.hibernate.envers.Audited; 3 | 4 | /** 5 | * @author Hern�n Chanfreau 6 | * 7 | */ 8 | @Audited 9 | public interface SimpleInterface { 10 | 11 | long getId(); 12 | 13 | void setId(long id); 14 | 15 | String getData(); 16 | 17 | void setData(String data); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_criteria/extras/from_fetch_example_embedded_and_many2one.java: -------------------------------------------------------------------------------- 1 | CriteriaQuery personCriteria = builder.createQuery( Person.class ); 2 | Root personRoot = person.from( Person.class ); 3 | // Person.address is an embedded attribute 4 | Fetch personAddress = personRoot.fetch( Person_.address ); 5 | // Address.country is a ManyToOne 6 | Fetch addressCountry = personAddress.fetch( Address_.country ); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/abstractembeddedcomponents/propertyref/Server.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.abstractembeddedcomponents.propertyref; 2 | 3 | 4 | 5 | /** 6 | * @author Steve Ebersole 7 | */ 8 | public interface Server { 9 | public Long getId(); 10 | public void setId(Long id); 11 | public String getServerType(); 12 | public void setServerType(String serverType); 13 | public Address getAddress(); 14 | public void setAddress(Address address); 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e2/a/DependentId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e2.a; 2 | import java.io.Serializable; 3 | import javax.persistence.Embedded; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class DependentId implements Serializable { 9 | String name; // matches name of @Id attribute 10 | @Embedded 11 | EmployeeId emp; //matches name of attribute and type of Employee PK 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hqlfetchscroll/Child.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.hqlfetchscroll; 2 | 3 | public class Child { 4 | 5 | private String name; 6 | 7 | Child() { 8 | } 9 | 10 | public Child(String name) { 11 | this.name = name; 12 | } 13 | 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | private void setName(String name) { 19 | this.name = name; 20 | } 21 | 22 | public String toString() { 23 | return name; 24 | } 25 | } -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/ops/Reptile.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.ops; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Reptile extends Animal { 10 | private float temperature; 11 | 12 | public float getTemperature() { 13 | return temperature; 14 | } 15 | 16 | public void setTemperature(float temperature) { 17 | this.temperature = temperature; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/PartyAffiliate.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.onetoone; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | import javax.persistence.OneToOne; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | public class PartyAffiliate { 12 | @Id 13 | String partyId; 14 | 15 | @OneToOne(mappedBy="partyAffiliate") 16 | Party party; 17 | 18 | String affiliateName; 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/override/Location.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.override; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Location { 11 | private String name; 12 | 13 | @Id 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName(String name) { 19 | this.name = name; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/referencedcolumnname/Vendor.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.referencedcolumnname; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Vendor { 11 | int id; 12 | 13 | @Id 14 | public int getId() { 15 | return id; 16 | } 17 | 18 | public void setId(int id) { 19 | this.id = id; 20 | } 21 | 22 | } 23 | 24 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/Reptile.java: -------------------------------------------------------------------------------- 1 | //$Id: Reptile.java 5686 2005-02-12 07:27:32Z steveebersole $ 2 | package org.hibernate.test.hql; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Reptile extends Animal { 9 | private float bodyTemperature; 10 | public float getBodyTemperature() { 11 | return bodyTemperature; 12 | } 13 | public void setBodyTemperature(float bodyTemperature) { 14 | this.bodyTemperature = bodyTemperature; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/jpa/MySubclassEntity.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.jpa; 2 | 3 | 4 | /** 5 | * {@inheritDoc} 6 | * 7 | * @author Steve Ebersole 8 | */ 9 | public class MySubclassEntity extends MyEntity { 10 | private String someSubProperty; 11 | 12 | public String getSomeSubProperty() { 13 | return someSubProperty; 14 | } 15 | 16 | public void setSomeSubProperty(String someSubProperty) { 17 | this.someSubProperty = someSubProperty; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/jpa/cascade/Other.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.jpa.cascade; 2 | 3 | 4 | /** 5 | * todo: describe Other 6 | * 7 | * @author Steve Ebersole 8 | */ 9 | public class Other { 10 | private Long id; 11 | private Parent owner; 12 | 13 | public Long getId() { 14 | return id; 15 | } 16 | 17 | public Parent getOwner() { 18 | return owner; 19 | } 20 | 21 | public void setOwner(Parent owner) { 22 | this.owner = owner; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/pc/extras/CheckingLazinessWithJPA.java: -------------------------------------------------------------------------------- 1 | javax.persistence.PersistenceUnitUtil jpaUtil = entityManager.getEntityManagerFactory().getPersistenceUnitUtil(); 2 | if ( jpaUtil.isLoaded( customer.getAddress() ) { 3 | //display address if loaded 4 | } 5 | if ( jpaUtil.isLoaded( customer.getOrders()) ) ) { 6 | //display orders if loaded 7 | } 8 | if (jpaUtil.isLoaded( customer, "detailedBio" ) ) { 9 | //display property detailedBio if loaded 10 | } -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/statement_update_bnf.txt: -------------------------------------------------------------------------------- 1 | update_statement ::= update_clause [where_clause] 2 | 3 | update_clause ::= UPDATE entity_name [[AS] identification_variable] 4 | SET update_item {, update_item}* 5 | 6 | update_item ::= [identification_variable.]{state_field | single_valued_object_field} 7 | = new_value 8 | 9 | new_value ::= scalar_expression | 10 | simple_entity_expression | 11 | NULL 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/id/package-info.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | /** 3 | * Test package for metatata facilities 4 | * It contains an example of package level metadata 5 | */ 6 | @org.hibernate.annotations.GenericGenerator(name = "system-uuid", strategy = "uuid") 7 | @org.hibernate.annotations.GenericGenerators( 8 | @org.hibernate.annotations.GenericGenerator(name = "system-uuid-2", strategy = "uuid") 9 | ) 10 | package org.hibernate.test.annotations.id; 11 | 12 | 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/inheritance/joined/PropertyAsset.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.inheritance.joined; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class PropertyAsset extends Asset { 10 | private double price; 11 | 12 | public double getPrice() { 13 | return price; 14 | } 15 | 16 | public void setPrice(double price) { 17 | this.price = price; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/stateless/Org.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.stateless; 2 | 3 | 4 | public class Org { 5 | private Integer id; 6 | private Country country; 7 | 8 | public Integer getId() { 9 | return id; 10 | } 11 | 12 | public void setId(Integer id) { 13 | this.id = id; 14 | } 15 | 16 | public Country getCountry() { 17 | return country; 18 | } 19 | 20 | public void setCountry(Country country) { 21 | this.country = country; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/tm/Item.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/org/hibernate/test/fileimport/Dog.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/collectionelement/indexedCollection/Contact.java: -------------------------------------------------------------------------------- 1 | //$ 2 | package org.hibernate.test.annotations.collectionelement.indexedCollection; 3 | import javax.persistence.Embeddable; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Embeddable 9 | public class Contact { 10 | private String name; 11 | 12 | public String getName() { 13 | return name; 14 | } 15 | 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/id/entities/MilitaryBuilding.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.id.entities; 3 | import javax.persistence.Id; 4 | import javax.persistence.IdClass; 5 | import javax.persistence.MappedSuperclass; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @MappedSuperclass 11 | @IdClass(Location.class) 12 | public class MilitaryBuilding { 13 | @Id 14 | public double longitude; 15 | @Id 16 | public double latitude; 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/inheritance/joined/FinancialAsset.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.inheritance.joined; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class FinancialAsset extends Asset { 10 | private double price; 11 | 12 | public double getPrice() { 13 | return price; 14 | } 15 | 16 | public void setPrice(double price) { 17 | this.price = price; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-envers/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 2 | log4j.appender.stdout.Target=System.out 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n 5 | 6 | log4j.rootLogger=info, stdout 7 | 8 | log4j.logger.org.hibernate.test=info 9 | log4j.logger.org.hibernate.tool.hbm2ddl=debug 10 | 11 | # SQL Logging - HHH-6833 12 | log4j.logger.org.hibernate.SQL=debug -------------------------------------------------------------------------------- /hibernate-infinispan/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 2 | log4j.appender.stdout.Target=System.out 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p [%t] %c{1}:%L - %m%n 5 | 6 | log4j.rootLogger=info, stdout 7 | 8 | log4j.logger.org.hibernate.test=info 9 | log4j.logger.org.hibernate.cache=info 10 | 11 | # SQL Logging - HHH-6833 12 | log4j.logger.org.hibernate.SQL=debug -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/abstractembeddedcomponents/cid/MyInterface.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.abstractembeddedcomponents.cid; 2 | import java.io.Serializable; 3 | 4 | /** 5 | * @author Steve Ebersole 6 | */ 7 | public interface MyInterface extends Serializable { 8 | public String getKey1(); 9 | public void setKey1(String key1); 10 | public String getKey2(); 11 | public void setKey2(String key2); 12 | public String getName(); 13 | public void setName(String name); 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/idmanytoone/alphabetical/Acces.java: -------------------------------------------------------------------------------- 1 | //$ 2 | package org.hibernate.test.annotations.idmanytoone.alphabetical; 3 | import java.io.Serializable; 4 | import java.math.BigInteger; 5 | import javax.persistence.Entity; 6 | import javax.persistence.Id; 7 | import javax.persistence.ManyToOne; 8 | 9 | @Entity 10 | public class Acces implements Serializable { 11 | @Id 12 | private BigInteger idpk; 13 | 14 | @ManyToOne 15 | private Droitacces idpkdracc; 16 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/tableperclass/T800.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.tableperclass; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class T800 extends Robot { 10 | public String getTargetName() { 11 | return targetName; 12 | } 13 | 14 | public void setTargetName(String targetName) { 15 | this.targetName = targetName; 16 | } 17 | 18 | private String targetName; 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/ondelete/Salesperson.java: -------------------------------------------------------------------------------- 1 | //$Id: Salesperson.java 7119 2005-06-12 22:03:30Z oneovthafew $ 2 | package org.hibernate.test.ondelete; 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | public class Salesperson extends Employee { 7 | private Set customers = new HashSet(); 8 | 9 | public Set getCustomers() { 10 | return customers; 11 | } 12 | 13 | public void setCustomers(Set customers) { 14 | this.customers = customers; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/LastUpdateListener.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test; 3 | import java.util.Date; 4 | import javax.persistence.PrePersist; 5 | import javax.persistence.PreUpdate; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | public class LastUpdateListener { 11 | @PreUpdate 12 | @PrePersist 13 | public void setLastUpdate(Cat o) { 14 | o.setLastUpdate( new Date() ); 15 | o.setManualVersion( o.getManualVersion() + 1 ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/query_ql/extras/predicate_between_example.txt: -------------------------------------------------------------------------------- 1 | select p 2 | from Customer c 3 | join c.paymentHistory p 4 | where c.id = 123 5 | and index(p) between 0 and 9 6 | 7 | select c 8 | from Customer c 9 | where c.president.dateOfBirth 10 | between {d '1945-01-01'} 11 | and {d '1965-01-01'} 12 | 13 | select o 14 | from Order o 15 | where o.total between 500 and 5000 16 | 17 | select p 18 | from Person p 19 | where p.name between 'A' and 'E' -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/access/Thingy.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.access; 3 | import javax.persistence.MappedSuperclass; 4 | import javax.persistence.Transient; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @MappedSuperclass 10 | public class Thingy { 11 | private String god; 12 | 13 | @Transient 14 | public String getGod() { 15 | return god; 16 | } 17 | 18 | public void setGod(String god) { 19 | this.god = god; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/manytoone/Customer.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.manytoone; 3 | import java.io.Serializable; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.Id; 7 | 8 | /** 9 | * @author Emmanuel Bernard 10 | */ 11 | @Entity(name="DealedCustomer") 12 | public class Customer implements Serializable { 13 | @Id @GeneratedValue public Integer id; 14 | public String userId; 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/id/Product.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/idbag/Group.java: -------------------------------------------------------------------------------- 1 | //$Id: Group.java 6058 2005-03-11 17:05:19Z oneovthafew $ 2 | package org.hibernate.test.idbag; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class Group { 9 | private String name; 10 | 11 | Group() {} 12 | 13 | public Group(String name) { 14 | this.name = name; 15 | } 16 | 17 | public String getName() { 18 | return name; 19 | } 20 | 21 | void setName(String name) { 22 | this.name = name; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/mapping/usertypes/TestEnumType.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | org.hibernate.test.mapping.usertypes.TestEnum 7 | 8 | 9 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/mappingexception/User.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/callbacks/FirstOneListener.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.callbacks; 3 | import javax.persistence.PreUpdate; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | public class FirstOneListener { 9 | @PreUpdate 10 | public void firstOne(CommunicationSystem object) { 11 | if ( !object.isFirst ) throw new IllegalStateException(); 12 | object.isFirst = true; 13 | object.isLast = false; 14 | object.communication++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/emops/Cat.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.emops; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Inheritance; 5 | import javax.persistence.InheritanceType; 6 | 7 | @Entity 8 | @Inheritance( strategy = InheritanceType.JOINED ) 9 | public class Cat extends Pet { 10 | int lives; 11 | 12 | public int getLives() { 13 | return lives; 14 | } 15 | 16 | public void setLives(int lives) { 17 | this.lives = lives; 18 | } 19 | } -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/ops/Workload.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.ops; 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.Id; 7 | 8 | /** 9 | * @author Emmanuel Bernard 10 | */ 11 | @Entity 12 | public class Workload { 13 | @Id 14 | @GeneratedValue 15 | public Integer id; 16 | public String name; 17 | @Column(name="load_") 18 | public Integer load; 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-envers/src/test/java/org/hibernate/envers/test/entities/StrTestEntityComparator.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.envers.test.entities; 2 | 3 | import java.util.Comparator; 4 | 5 | public class StrTestEntityComparator implements Comparator { 6 | public static final StrTestEntityComparator INSTANCE = new StrTestEntityComparator(); 7 | 8 | @Override 9 | public int compare(StrTestEntity o1, StrTestEntity o2) { 10 | return o1.getStr().compareTo(o2.getStr()); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/Trousers.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.onetoone; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | import javax.persistence.JoinColumn; 6 | import javax.persistence.OneToOne; 7 | 8 | /** 9 | * @author Emmanuel Bernard 10 | */ 11 | @Entity 12 | public class Trousers { 13 | @Id 14 | public Integer id; 15 | 16 | @OneToOne 17 | @JoinColumn(name = "zip_id") 18 | public TrousersZip zip; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/criteria/Animal.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/criteria/Role.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.criteria; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.EnumType; 5 | import javax.persistence.Enumerated; 6 | import javax.persistence.Id; 7 | import javax.persistence.Table; 8 | 9 | /** 10 | * @author Strong Liu 11 | */ 12 | @Entity 13 | @Table(name = "roles") 14 | public class Role extends VersionedRecord { 15 | @Id 16 | @Enumerated(EnumType.STRING) 17 | Code code; 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/criteria/TestObject.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/iterate/Item.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 9 | 10 | 11 | from Item order by name desc 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/mapping/usertypes/TestEntity.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.mapping.usertypes; 2 | 3 | public class TestEntity { 4 | private int id; 5 | private TestEnum testEnum; 6 | 7 | public void setId(int id) { 8 | this.id = id; 9 | } 10 | public int getId() { 11 | return id; 12 | } 13 | public void setTestEnum(TestEnum testEnum) { 14 | this.testEnum = testEnum; 15 | } 16 | public TestEnum getTestEnum() { 17 | return testEnum; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/org/hibernate/metamodel/source/annotations/xml/mocker/entity-metadata-complete.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | org.hibernate.metamodel.source.annotations.xml.mocker 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/extras/using_a_StatelessSession.java: -------------------------------------------------------------------------------- 1 | StatelessSession session = sessionFactory.openStatelessSession(); 2 | Transaction tx = session.beginTransaction(); 3 | 4 | ScrollableResults customers = session.getNamedQuery("GetCustomers") 5 | .scroll(ScrollMode.FORWARD_ONLY); 6 | while ( customers.next() ) { 7 | Customer customer = (Customer) customers.get(0); 8 | customer.updateStuff(...); 9 | session.update(customer); 10 | } 11 | 12 | tx.commit(); 13 | session.close(); -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/cid/B.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.cid; 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | 8 | /** 9 | * @author Artur Legan 10 | */ 11 | @Entity 12 | public class B { 13 | 14 | @Id 15 | @GeneratedValue 16 | private Long id; 17 | 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Long id) { 24 | this.id = id; 25 | } 26 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/polymorphism/SportCar.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.polymorphism; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Table; 5 | 6 | import org.hibernate.annotations.PolymorphismType; 7 | 8 | /** 9 | * @author Emmanuel Bernard 10 | */ 11 | @Entity 12 | @Table(name = "sport_car") 13 | @org.hibernate.annotations.Entity(polymorphism = PolymorphismType.EXPLICIT) //raise a warn 14 | public class SportCar extends Car { 15 | } 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/hibernate.cfg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/inheritance/Strawberry.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.inheritance; 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Strawberry extends Fruit { 11 | private Long size; 12 | 13 | @Column(name="size_") 14 | public Long getSize() { 15 | return size; 16 | } 17 | 18 | public void setSize(Long size) { 19 | this.size = size; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/cid/C.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.cid; 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | 8 | /** 9 | * @author Artur Legan 10 | */ 11 | @Entity 12 | public class C { 13 | 14 | @Id 15 | @GeneratedValue 16 | private Long id; 17 | 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Long id) { 24 | this.id = id; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/derivedidentities/e5/a/PersonId.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.annotations.derivedidentities.e5.a; 2 | import java.io.Serializable; 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public class PersonId implements Serializable { 8 | String firstName; 9 | String lastName; 10 | 11 | public PersonId() { 12 | } 13 | 14 | public PersonId(String firstName, String lastName) { 15 | this.firstName = firstName; 16 | this.lastName = lastName; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/cfg/persister/Palmtree.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.cfg.persister; 2 | 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class Palmtree extends Tree { 10 | private double leaveSize; 11 | 12 | public double getLeaveSize() { 13 | return leaveSize; 14 | } 15 | 16 | public void setLeaveSize(double leaveSize) { 17 | this.leaveSize = leaveSize; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/interfaceproxy/Item.java: -------------------------------------------------------------------------------- 1 | //$Id: Item.java 4407 2004-08-22 01:20:08Z oneovthafew $ 2 | package org.hibernate.test.interfaceproxy; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public interface Item { 9 | /** 10 | * @return Returns the id. 11 | */ 12 | public Long getId(); 13 | 14 | /** 15 | * @return Returns the name. 16 | */ 17 | public String getName(); 18 | 19 | /** 20 | * @param name The name to set. 21 | */ 22 | public void setName(String name); 23 | } -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/emops/Colony.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.emops; 3 | import javax.persistence.Entity; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Id; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | public class Colony { 12 | @Id 13 | @GeneratedValue 14 | private Long id; 15 | 16 | 17 | public Long getId() { 18 | return id; 19 | } 20 | 21 | public void setId(Long id) { 22 | this.id = id; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/ops/NumberedNode.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.jpa.test.ops; 3 | 4 | 5 | /** 6 | * @author Gavin King 7 | */ 8 | public class NumberedNode extends Node { 9 | 10 | private long id; 11 | 12 | public NumberedNode() { 13 | super(); 14 | } 15 | 16 | 17 | public NumberedNode(String name) { 18 | super( name ); 19 | } 20 | 21 | public long getId() { 22 | return id; 23 | } 24 | 25 | public void setId(long id) { 26 | this.id = id; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/access/Chair.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.access; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Transient; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @Entity 10 | public class Chair extends Furniture { 11 | 12 | @Transient 13 | private String pillow; 14 | 15 | public String getPillow() { 16 | return pillow; 17 | } 18 | 19 | public void setPillow(String pillow) { 20 | this.pillow = pillow; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/fkcircularity/A.java: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | package org.hibernate.test.annotations.fkcircularity; 3 | import javax.persistence.EmbeddedId; 4 | import javax.persistence.Entity; 5 | 6 | /** 7 | * Test entities ANN-722. 8 | * 9 | * @author Hardy Ferentschik 10 | * 11 | */ 12 | @Entity 13 | public class A { 14 | private A_PK id; 15 | 16 | @EmbeddedId 17 | public A_PK getId() { 18 | return id; 19 | } 20 | 21 | public void setId(A_PK id) { 22 | this.id = id; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/fkcircularity/ClassB.java: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | package org.hibernate.test.annotations.fkcircularity; 3 | import javax.persistence.Entity; 4 | import javax.persistence.PrimaryKeyJoinColumn; 5 | import javax.persistence.Table; 6 | 7 | /** 8 | * Test entities ANN-730. 9 | * 10 | * @author Hardy Ferentschik 11 | * 12 | */ 13 | @Entity 14 | @Table(name = "class_b") 15 | @PrimaryKeyJoinColumn(name = "id", referencedColumnName = "id") 16 | public class ClassB extends ClassA { 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/fkcircularity/ClassC.java: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | package org.hibernate.test.annotations.fkcircularity; 3 | import javax.persistence.Entity; 4 | import javax.persistence.PrimaryKeyJoinColumn; 5 | import javax.persistence.Table; 6 | 7 | /** 8 | * Test entities ANN-730. 9 | * 10 | * @author Hardy Ferentschik 11 | * 12 | */ 13 | @Entity 14 | @Table(name = "class_c") 15 | @PrimaryKeyJoinColumn(name = "id", referencedColumnName = "id") 16 | public class ClassC extends ClassB { 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/fkcircularity/ClassD.java: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | package org.hibernate.test.annotations.fkcircularity; 3 | import javax.persistence.Entity; 4 | import javax.persistence.PrimaryKeyJoinColumn; 5 | import javax.persistence.Table; 6 | 7 | /** 8 | * Test entities ANN-730. 9 | * 10 | * @author Hardy Ferentschik 11 | * 12 | */ 13 | @Entity 14 | @Table(name = "class_1d") 15 | @PrimaryKeyJoinColumn(name = "id", referencedColumnName = "id") 16 | public class ClassD extends ClassC { 17 | } 18 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/fkcircularity/D.java: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | package org.hibernate.test.annotations.fkcircularity; 3 | import javax.persistence.EmbeddedId; 4 | import javax.persistence.Entity; 5 | 6 | /** 7 | * Test entities ANN-722. 8 | * 9 | * @author Hardy Ferentschik 10 | * 11 | */ 12 | @Entity 13 | public class D { 14 | private D_PK id; 15 | 16 | @EmbeddedId 17 | public D_PK getId() { 18 | return id; 19 | } 20 | 21 | public void setId(D_PK id) { 22 | this.id = id; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/generics/Stuff.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.generics; 3 | import javax.persistence.ManyToOne; 4 | import javax.persistence.MappedSuperclass; 5 | 6 | /** 7 | * @author Emmanuel Bernard 8 | */ 9 | @MappedSuperclass 10 | public class Stuff { 11 | private Value value; 12 | 13 | @ManyToOne 14 | public Value getValue() { 15 | return value; 16 | } 17 | 18 | public void setValue(Value value) { 19 | this.value = value; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/tableperclass/Product.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.tableperclass; 3 | import javax.persistence.Entity; 4 | import javax.persistence.Table; 5 | import javax.persistence.UniqueConstraint; 6 | 7 | /** 8 | * @author Emmanuel Bernard 9 | */ 10 | @Entity 11 | @Table( name = "xPM_Product", uniqueConstraints = {@UniqueConstraint( columnNames = { 12 | "manufacturerPartNumber", "manufacturerId"} )} ) 13 | public class Product extends Component { 14 | } 15 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/criteria/StudentDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Created on 28-Jan-2005 3 | * 4 | */ 5 | package org.hibernate.test.criteria; 6 | 7 | 8 | /** 9 | * @author max 10 | * 11 | */ 12 | public class StudentDTO { 13 | 14 | private String studentName; 15 | private String courseDescription; 16 | 17 | public StudentDTO() { } 18 | 19 | public String getName() { 20 | return studentName; 21 | } 22 | 23 | public String getDescription() { 24 | return courseDescription; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/fileimport/Dog.java: -------------------------------------------------------------------------------- 1 | package org.hibernate.test.fileimport; 2 | 3 | 4 | /** 5 | * @author Emmanuel Bernard 6 | */ 7 | public class Dog { 8 | private Integer id; 9 | private Human master; 10 | 11 | public Integer getId() { 12 | return id; 13 | } 14 | 15 | public void setId(Integer id) { 16 | this.id = id; 17 | } 18 | 19 | public Human getMaster() { 20 | return master; 21 | } 22 | 23 | public void setMaster(Human master) { 24 | this.master = master; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/hql/CompositeIdEntity.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/readonly/StudentDTO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Created on 28-Jan-2005 3 | * 4 | */ 5 | package org.hibernate.test.readonly; 6 | 7 | 8 | /** 9 | * @author max 10 | * 11 | */ 12 | public class StudentDTO { 13 | 14 | private String studentName; 15 | private String courseDescription; 16 | 17 | public StudentDTO() { } 18 | 19 | public String getName() { 20 | return studentName; 21 | } 22 | 23 | public String getDescription() { 24 | return courseDescription; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /hibernate-core/src/test/resources/org/hibernate/test/annotations/bytecode/Hammer.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /documentation/src/main/docbook/devguide/en-US/chapters/events/extras/LoadListenerExample.java: -------------------------------------------------------------------------------- 1 | public class LoadListenerExample implements LoadEventListener { 2 | // this is the single method defined by the LoadEventListener interface 3 | public void onLoad(LoadEvent event, LoadEventListener.LoadType loadType) 4 | throws HibernateException { 5 | if ( !MySecurity.isAuthorized( event.getEntityClassName(), event.getEntityId() ) ) { 6 | throw MySecurityException("Unauthorized access"); 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/cid/A.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.cid; 3 | import java.io.Serializable; 4 | import javax.persistence.EmbeddedId; 5 | import javax.persistence.Entity; 6 | 7 | 8 | /** 9 | * @author Artur Legan 10 | * 11 | */ 12 | @Entity 13 | public class A implements Serializable{ 14 | 15 | @EmbeddedId 16 | private AId aId; 17 | 18 | public AId getAId() { 19 | return aId; 20 | } 21 | 22 | public void setAId(AId aId) { 23 | this.aId = aId; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/annotations/entity/CommunityBid.java: -------------------------------------------------------------------------------- 1 | //$Id$ 2 | package org.hibernate.test.annotations.entity; 3 | import javax.persistence.Entity; 4 | 5 | /** 6 | * @author Emmanuel Bernard 7 | */ 8 | @Entity 9 | public class CommunityBid extends Bid { 10 | private Starred communityNote; 11 | 12 | public Starred getCommunityNote() { 13 | return communityNote; 14 | } 15 | 16 | public void setCommunityNote(Starred communityNote) { 17 | this.communityNote = communityNote; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /hibernate-core/src/test/java/org/hibernate/test/cfg/orm-serializable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 10 | 11 | --------------------------------------------------------------------------------