├── Src ├── .editorconfig ├── Build │ ├── readme.txt │ └── buildDoc.bat ├── .nuget │ ├── NuGet.exe │ └── NuGet.Config ├── NHibernate.Envers │ ├── Envers.snk │ ├── Entities │ │ └── Mapper │ │ │ ├── Id │ │ │ └── ISimpleIdMapperBuilder.cs │ │ │ ├── ISimpleMapperBuilder.cs │ │ │ ├── Relation │ │ │ ├── Lazy │ │ │ │ └── Initializor │ │ │ │ │ └── IInitializor.cs │ │ │ └── Query │ │ │ │ └── IRelationQueryGenerator.cs │ │ │ ├── IExtendedPropertyMapper.cs │ │ │ ├── ICompositeMapperBuilder.cs │ │ │ └── ICustomCollectionMapperFactory.cs │ ├── Configuration │ │ ├── Attributes │ │ │ ├── RelationTargetAuditMode.cs │ │ │ ├── NotAuditedAttribute.cs │ │ │ ├── JoinAuditTableAttribute.cs │ │ │ ├── ModifiedEntityNamesAttribute.cs │ │ │ ├── AuditTableAttribute.cs │ │ │ └── RevisionTimestampAttribute.cs │ │ ├── Metadata │ │ │ ├── DefaultAuditEntityFactory.cs │ │ │ ├── DefaultEnversPostInstantiationListener.cs │ │ │ ├── Reader │ │ │ │ └── IPersistentPropertiesSource.cs │ │ │ └── AuditTableData.cs │ │ ├── Fluent │ │ │ ├── FluentException.cs │ │ │ └── IAttributeProvider.cs │ │ ├── Store │ │ │ ├── IMetaDataAdder.cs │ │ │ ├── IEntityMeta.cs │ │ │ └── IMetaDataProvider.cs │ │ ├── StringConfigurationEntry.cs │ │ └── ConfigurationComparer.cs │ ├── Query │ │ ├── Criteria │ │ │ ├── IExtendableCriterion.cs │ │ │ ├── IAuditCriterion.cs │ │ │ └── AuditRelatedId.cs │ │ ├── Impl │ │ │ ├── IAuditQueryImplementor.cs │ │ │ └── RevisionEntityInfo.cs │ │ ├── Order │ │ │ └── IAuditOrder.cs │ │ ├── Property │ │ │ ├── RevisionNumberPropertyName.cs │ │ │ ├── RevisionTypePropertyName.cs │ │ │ └── IPropertyNameGetter.cs │ │ ├── IRevisionEntityInfo.cs │ │ └── Projection │ │ │ └── IAuditProjection.cs │ ├── Exceptions │ │ ├── NotAuditedException.cs │ │ ├── AuditException.cs │ │ └── RevisionDoesNotExistException.cs │ ├── Reader │ │ └── IAuditReaderImplementor.cs │ ├── RevisionInfo │ │ └── IRevisionInfoGenerator.cs │ ├── IEntityFactory.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Tools │ │ ├── Incrementor.cs │ │ ├── ArgumentsTools.cs │ │ ├── Graph │ │ │ └── IGraphDefiner.cs │ │ └── StringTools.cs │ ├── Synchronization │ │ └── Work │ │ │ ├── IWorkUnitMergeDispatcher.cs │ │ │ └── IWorkUnitMergeVisitor.cs │ └── RevisionType.cs ├── doc │ └── Reference │ │ ├── images │ │ ├── lite.png │ │ ├── NhLogo.png │ │ ├── overview.png │ │ ├── AuthorWork.png │ │ ├── fullcream.png │ │ ├── EmployerEmployee.png │ │ ├── nhibernate_logo_a.png │ │ └── CustomerOrderProduct.png │ │ └── support │ │ ├── lib │ │ ├── batik.jar │ │ ├── saxon.jar │ │ ├── jai_core.jar │ │ ├── jai_codec.jar │ │ ├── rowan-0.1.jar │ │ ├── saxon-dbxsl-extensions.jar │ │ ├── fop-0.20.5-RFC3066-patched.jar │ │ └── avalon-framework-cvs-20020806.jar │ │ ├── help2 │ │ ├── NhibernateCollection_A.HxK │ │ ├── NhibernateCollection_F.HxK │ │ ├── Install Documentation In VS .NET Help.bat │ │ ├── Uninstall Documentation In VS .NET Help.bat │ │ └── NhibernateCollection.HxT │ │ ├── docbook-xsl │ │ ├── html │ │ │ └── docbookng.xsl │ │ ├── fo │ │ │ └── docbookng.xsl │ │ └── params │ │ │ ├── template.xml │ │ │ ├── figure.properties.xml │ │ │ ├── example.properties.xml │ │ │ ├── xref.properties.xml │ │ │ ├── equation.properties.xml │ │ │ ├── procedure.properties.xml │ │ │ ├── hyphenate.xml │ │ │ ├── alignment.xml │ │ │ ├── admonition.properties.xml │ │ │ ├── process.source.toc.xml │ │ │ ├── shade.verbatim.xml │ │ │ ├── table.entry.padding.xml │ │ │ ├── olink.pubid.xml │ │ │ ├── olink.sysid.xml │ │ │ ├── generate.index.xml │ │ │ ├── points.per.em.xml │ │ │ ├── line-height.xml │ │ │ ├── olink.fragid.xml │ │ │ ├── olink.outline.ext.xml │ │ │ ├── olink.resolver.xml │ │ │ ├── footer.rule.xml │ │ │ ├── generate.legalnotice.link.xml │ │ │ ├── header.rule.xml │ │ │ ├── table.cell.border.style.xml │ │ │ ├── process.empty.source.toc.xml │ │ │ ├── table.frame.border.style.xml │ │ │ ├── toc.max.depth.xml │ │ │ ├── default.float.class.xml │ │ │ ├── column.count.body.xml │ │ │ ├── table.cell.border.thickness.xml │ │ │ ├── body.font.family.xml │ │ │ ├── column.count.index.xml │ │ │ ├── make.year.ranges.xml │ │ │ ├── preface.autolabel.xml │ │ │ ├── section.autolabel.xml │ │ │ ├── base.dir.xml │ │ │ ├── htmlhelp.hhc.width.xml │ │ │ ├── htmlhelp.hhc.xml │ │ │ ├── page.orientation.xml │ │ │ └── part.autolabel.xml │ │ └── docbook-dtd │ │ └── README ├── NHibernate.Envers.Tests │ ├── Entities │ │ ├── Ids │ │ │ ├── CustomEnum.cs │ │ │ ├── EmbId.cs │ │ │ ├── DateEmbId.cs │ │ │ ├── EmbIdWithCustomType.cs │ │ │ └── ManyToOneNotAuditedEmbId.cs │ │ ├── ManyToAny │ │ │ ├── Order.hbm.xml │ │ │ ├── Purchase.hbm.xml │ │ │ ├── WirePayment.hbm.xml │ │ │ ├── CreditCardPayment.hbm.xml │ │ │ ├── IPayment.cs │ │ │ ├── Order.cs │ │ │ ├── Purchase.cs │ │ │ ├── CreditCardPayment.cs │ │ │ └── WirePayment.cs │ │ ├── RevEntity │ │ │ ├── InheritedRevEntity.cs │ │ │ ├── TestExceptionRevisionListener.cs │ │ │ ├── TestRevisionListener.cs │ │ │ ├── TrackModifiedEntities │ │ │ │ ├── ExtendedRevisionEntity .cs │ │ │ │ ├── ExtendedRevisionListener .cs │ │ │ │ └── CustomEntityTrackingRevisionListener .cs │ │ │ ├── CustomRevEntity.hbm.xml │ │ │ ├── InheritedRevEntity.hbm.xml │ │ │ ├── CustomDateRevEntity.hbm.xml │ │ │ ├── ExceptionListenerRevEntity.hbm.xml │ │ │ ├── ListenerRevEntity.hbm.xml │ │ │ ├── CustomDataRevEntity.hbm.xml │ │ │ ├── CustomRevEntityColumnMapping.hbm.xml │ │ │ ├── CustomRevEntityFieldCamelcaseAccess.hbm.xml │ │ │ └── CustomRevEntityFieldAccess.hbm.xml │ │ ├── CustomType │ │ │ ├── ParametrizedCustomTypeEntity.cs │ │ │ ├── CompositeCustomTypeEntity.cs │ │ │ ├── PrimitiveCustomTypeEntity.cs │ │ │ └── PrimitiveImmutableType.cs │ │ ├── Collection │ │ │ ├── StringMapEntity.cs │ │ │ └── EnumSetEntity.cs │ │ ├── UnversionedStrTestEntity.cs │ │ ├── Components │ │ │ ├── Relations │ │ │ │ └── ManyToOneComponent.cs │ │ │ └── Component2.cs │ │ └── ManyToMany │ │ │ └── IntNoAutoIdTestEntity.cs │ ├── AuditStrategyForTest.cs │ ├── NetSpecific │ │ ├── UnitTests │ │ │ ├── Fluent │ │ │ │ ├── Model │ │ │ │ │ ├── NotAuditedEntity.cs │ │ │ │ │ ├── InheritedRevisionEntity.cs │ │ │ │ │ ├── MethodEntity.cs │ │ │ │ │ ├── RevListener.cs │ │ │ │ │ ├── RevisionEntity.cs │ │ │ │ │ ├── NotAuditedOwnerEntity.cs │ │ │ │ │ ├── FieldEntity.cs │ │ │ │ │ ├── SomePropsEntity.cs │ │ │ │ │ ├── Inheritance.cs │ │ │ │ │ ├── RevisionEntityWithEntityNames.cs │ │ │ │ │ └── SomeCollectionMapper.cs │ │ │ │ └── MethodTest.cs │ │ │ ├── Ids │ │ │ │ ├── Mapping.hbm.xml │ │ │ │ └── CompositeIdNoComponentTest.cs │ │ │ └── Interfaces │ │ │ │ └── CovariantInterfacesTests.cs │ │ ├── Integration │ │ │ ├── Component │ │ │ │ ├── BaseClassComponent.cs │ │ │ │ ├── DerivedClassComponent.cs │ │ │ │ ├── BaseClassOwner.cs │ │ │ │ ├── DerivedClassOwner.cs │ │ │ │ └── StructComponent2.cs │ │ │ ├── EntityInstantiation │ │ │ │ ├── IExternalContext.cs │ │ │ │ ├── TestExternalContext.cs │ │ │ │ ├── PostInstantiationListener.cs │ │ │ │ ├── FactoryCreatedTestEntity.cs │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── NotFoundIgnore │ │ │ │ └── BaseType │ │ │ │ │ ├── ChildName.cs │ │ │ │ │ └── Parent.cs │ │ │ ├── BidirectionalSameColumn │ │ │ │ ├── ModelConfigurationShared.cs │ │ │ │ ├── ModelShared.cs │ │ │ │ └── Model.cs │ │ │ ├── Transaction │ │ │ │ ├── NoSchemaEntity.cs │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── CustomMapping │ │ │ │ ├── UserCollection │ │ │ │ │ ├── ISpecialCollection.cs │ │ │ │ │ ├── Number.cs │ │ │ │ │ ├── Entity.cs │ │ │ │ │ └── SpecialCollection.cs │ │ │ │ └── ImplicitEnversCollectionType │ │ │ │ │ └── Model.cs │ │ │ ├── ManyToOne │ │ │ │ └── LazyProperty │ │ │ │ │ ├── Person.cs │ │ │ │ │ ├── Car.cs │ │ │ │ │ └── Bidirectional │ │ │ │ │ ├── Car.cs │ │ │ │ │ └── Person.cs │ │ │ ├── MultiLevelInheritance │ │ │ │ ├── Child.cs │ │ │ │ ├── InheritedParent.cs │ │ │ │ └── Parent.cs │ │ │ ├── CustomType │ │ │ │ ├── CLOBCustomTypeEntity.cs │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── Access │ │ │ │ ├── None │ │ │ │ │ └── SimpleProperty │ │ │ │ │ │ ├── Entity.cs │ │ │ │ │ │ └── Mapping.hbm.xml │ │ │ │ └── Readonly │ │ │ │ │ ├── Mapping.hbm.xml │ │ │ │ │ └── ReadonlyEntity.cs │ │ │ ├── Ctor │ │ │ │ ├── NonPublicCtorComponent.cs │ │ │ │ ├── StructComponentWithDefinedCtor.cs │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── BiDirOneToOneWithOneSideNotAudited │ │ │ │ ├── Child.cs │ │ │ │ └── Parent.cs │ │ │ ├── Configuration │ │ │ │ ├── SimpleAuiditableForConfEntity.cs │ │ │ │ ├── Incorrect │ │ │ │ │ ├── Model.cs │ │ │ │ │ └── Mapping.hbm.xml │ │ │ │ ├── Naming │ │ │ │ │ ├── Model.cs │ │ │ │ │ └── Mapping.hbm.xml │ │ │ │ └── Inheritance │ │ │ │ │ ├── Mapping.hbm.xml │ │ │ │ │ └── Model.cs │ │ │ ├── EnumType │ │ │ │ ├── Model.cs │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── SortedSetAndMap │ │ │ │ └── StrTestEntityComparer.cs │ │ │ ├── DynamicComponent │ │ │ │ ├── JoinWithDynamicComponent │ │ │ │ │ ├── Person.cs │ │ │ │ │ └── Car.cs │ │ │ │ ├── DynamicTestEntity.cs │ │ │ │ ├── SingleProperty.hbm.xml │ │ │ │ └── MultipleProperty.hbm.xml │ │ │ ├── RevInfo │ │ │ │ ├── RevEntityIncorrectListenerType.cs │ │ │ │ └── RevEntityIncorrectListenerType.hbm.xml │ │ │ ├── Query │ │ │ │ ├── Model.cs │ │ │ │ ├── Mapping.hbm.xml │ │ │ │ └── RelationIn │ │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── PropertyNull │ │ │ │ ├── EntityWithPrimitiveNullAsCamelcaseUnderscore.cs │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── Strategy │ │ │ │ └── SetOfValues │ │ │ │ │ ├── SetOfValuesTestEntity.cs │ │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── IdBag │ │ │ │ └── ManyToMany │ │ │ │ │ └── UniDirectional │ │ │ │ │ └── UniOwning.cs │ │ │ ├── InsertUpdateFalse │ │ │ │ └── ChildComponent.cs │ │ │ ├── Join │ │ │ │ ├── NoAuditedCollection │ │ │ │ │ └── Model.cs │ │ │ │ ├── NoAuditedProperties │ │ │ │ │ └── Model.cs │ │ │ │ └── NoAuditedCollectionWithAudited │ │ │ │ │ └── Model.cs │ │ │ ├── OneToOne │ │ │ │ └── OneToOneOwningEntity.cs │ │ │ └── ModifiedFlags │ │ │ │ └── Casee.cs │ │ └── Entities │ │ │ └── ListModel.cs │ ├── Integration │ │ ├── Interfaces │ │ │ ├── Components │ │ │ │ ├── IComponent.cs │ │ │ │ ├── Mapping.hbm.xml │ │ │ │ └── Component1.cs │ │ │ ├── Relation │ │ │ │ ├── ISetRefEdEntity.cs │ │ │ │ └── Mapping.hbm.xml │ │ │ └── Inheritance │ │ │ │ ├── AllAudited │ │ │ │ ├── ISimple.cs │ │ │ │ ├── Union │ │ │ │ │ └── UnionAllAuditedTest.cs │ │ │ │ ├── Joined │ │ │ │ │ └── JoinedAllAuditedTest.cs │ │ │ │ ├── Subclass │ │ │ │ │ └── SubclassAllAuditedTest.cs │ │ │ │ ├── NonAuditedImplementor.cs │ │ │ │ └── AuditedImplementor.cs │ │ │ │ ├── PropertiesAudited │ │ │ │ ├── Union │ │ │ │ │ └── UnionAllAuditedTest.cs │ │ │ │ ├── Joined │ │ │ │ │ └── JoinedAllAuditedTest.cs │ │ │ │ ├── Subclass │ │ │ │ │ └── SubclassAllAuditedTest.cs │ │ │ │ ├── ISimple.cs │ │ │ │ ├── NonAuditedImplementor.cs │ │ │ │ └── AuditedImplementor.cs │ │ │ │ └── PropertiesAudited2 │ │ │ │ ├── Union │ │ │ │ └── UnionAllAuditedTest.cs │ │ │ │ ├── Joined │ │ │ │ └── JoinedAllAuditedTest.cs │ │ │ │ ├── Subclass │ │ │ │ └── SubclassAllAuditedTest.cs │ │ │ │ ├── ISimple.cs │ │ │ │ ├── NonAuditedImplementor.cs │ │ │ │ └── AuditedImplementor.cs │ │ ├── Inheritance │ │ │ ├── Mixed │ │ │ │ ├── IActivity.cs │ │ │ │ ├── CheckInActivity.cs │ │ │ │ ├── AbstractActivity.cs │ │ │ │ ├── AbstractCheckActivity.cs │ │ │ │ ├── ActivityId.cs │ │ │ │ └── NormalActivity.cs │ │ │ ├── Entities │ │ │ │ ├── EmptyChildEntity.cs │ │ │ │ ├── PersonalContact.cs │ │ │ │ ├── Contact.cs │ │ │ │ └── ParentNotIngEntity.cs │ │ │ ├── Joined │ │ │ │ ├── Relation │ │ │ │ │ └── Unidirectional │ │ │ │ │ │ ├── SetEntity.cs │ │ │ │ │ │ ├── ContainedEntity.cs │ │ │ │ │ │ ├── AbstractSetEntity.cs │ │ │ │ │ │ └── AbstractContainedEntity.cs │ │ │ │ ├── EmptyChild │ │ │ │ │ └── Mapping.hbm.xml │ │ │ │ ├── Mapping.hbm.xml │ │ │ │ └── PrimaryKeyJoin │ │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── TablePerClass │ │ │ │ └── Mapping.hbm.xml │ │ │ └── Single │ │ │ │ └── Mapping.hbm.xml │ │ ├── AuditReader │ │ │ ├── NotAuditedTestEntity.cs │ │ │ ├── AuditedTestEntity.cs │ │ │ └── Mapping.hbm.xml │ │ ├── EntityNames │ │ │ ├── OneToManyNotAudited │ │ │ │ ├── Person.cs │ │ │ │ └── Car.cs │ │ │ ├── SingleAssociatedNotAudited │ │ │ │ ├── Person.cs │ │ │ │ └── Car.cs │ │ │ ├── AuditedEntity │ │ │ │ ├── Person.cs │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── OneToManyAudited │ │ │ │ ├── Person.cs │ │ │ │ └── Car.cs │ │ │ ├── SingleAssociatedAudited │ │ │ │ ├── Person.cs │ │ │ │ └── Car.cs │ │ │ └── ManyToManyAudited │ │ │ │ ├── Car.cs │ │ │ │ └── Person.cs │ │ ├── ManyToMany │ │ │ └── InverseToSuperclass │ │ │ │ ├── DetailSubclass.cs │ │ │ │ ├── DetailSubclass2.cs │ │ │ │ ├── DetailSuperclass.cs │ │ │ │ └── Master.cs │ │ ├── OneToMany │ │ │ └── InverseToSuperclass │ │ │ │ ├── DetailSubclass.cs │ │ │ │ ├── DetailSubclass2.cs │ │ │ │ ├── DetailSuperclass.cs │ │ │ │ └── Master.cs │ │ ├── Collection │ │ │ ├── NoRevision │ │ │ │ ├── Name.cs │ │ │ │ ├── Person.cs │ │ │ │ ├── CollectionChangeNoRevisionTest.cs │ │ │ │ └── CollectionChangeRevisionTest.cs │ │ │ ├── MapKey │ │ │ │ ├── IdMapKeyEntity.cs │ │ │ │ └── ComponentMapKeyEntity.cs │ │ │ └── Embeddable │ │ │ │ └── DarkCharacter.hbm.xml │ │ ├── Generated │ │ │ ├── SimpleEntity.cs │ │ │ └── Mapping.hbm.xml │ │ ├── Basic │ │ │ ├── NonAuditedEntity.hbm.xml │ │ │ └── ScalePrecision.hbm.xml │ │ ├── Merge │ │ │ └── Mapping.hbm.xml │ │ ├── RevEntity │ │ │ └── TrackModifiedEntities │ │ │ │ ├── Car.cs │ │ │ │ └── Person.cs │ │ ├── NotInsertable │ │ │ ├── ManyToOne │ │ │ │ └── ManyToOneNotInsertableEntity.cs │ │ │ └── Mapping.hbm.xml │ │ ├── Ids │ │ │ └── ManyToOneIdNotAuditedTest.hbm.xml │ │ ├── Versioning │ │ │ └── Mapping.hbm.xml │ │ ├── ModifiedFlags │ │ │ └── Entities │ │ │ │ └── ManyToMany │ │ │ │ ├── Professor.cs │ │ │ │ └── Student.cs │ │ ├── OneToOne │ │ │ └── UniDirectional │ │ │ │ └── UniRefIngMulIdEntity.cs │ │ ├── Primitive │ │ │ └── Mapping.hbm.xml │ │ ├── Data │ │ │ ├── SerObj.cs │ │ │ ├── SerializableTestEntity.cs │ │ │ └── DateTestEntity.cs │ │ ├── Naming │ │ │ ├── Quotation │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── Ids │ │ │ │ └── EmbIdNaming.cs │ │ │ └── Estonia.hbm.xml │ │ ├── SuperClass │ │ │ ├── AuditOverride │ │ │ │ └── Invalid │ │ │ │ │ └── Mapping.hbm.xml │ │ │ ├── AuditedAtSuperclassLevel │ │ │ │ ├── Mapping.hbm.xml │ │ │ │ ├── AuditAllSubclass │ │ │ │ │ └── Mapping.hbm.xml │ │ │ │ └── AuditMethodSubclass │ │ │ │ │ └── Mapping.hbm.xml │ │ │ └── AuditAtMethodSuperclassLevel │ │ │ │ ├── Mapping.hbm.xml │ │ │ │ ├── AuditAllSubclass │ │ │ │ └── Mapping.hbm.xml │ │ │ │ └── AuditMethodSubclass │ │ │ │ └── Mapping.hbm.xml │ │ ├── NotUpdatable │ │ │ └── Mapping.hbm.xml │ │ ├── SameIds │ │ │ ├── Mapping.hbm.xml │ │ │ ├── SameIdTestEntity1.cs │ │ │ └── SameIdTestEntity2.cs │ │ ├── Strategy │ │ │ └── Model │ │ │ │ └── Mapping.hbm.xml │ │ └── Properties │ │ │ └── Mapping.hbm.xml │ ├── ValidityTestBase.cs │ ├── TestBase.cs │ ├── Tools │ │ ├── StringExtensions.cs │ │ └── ConfigurationExtensions.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── HOW_TO_RUN_TESTS.txt │ ├── log4net.xml │ └── Setup.cs └── .gitignore ├── .config └── dotnet-tools.json └── README.txt /Src/.editorconfig: -------------------------------------------------------------------------------- 1 | root=true 2 | 3 | [*.cs] 4 | indent_style = tab 5 | -------------------------------------------------------------------------------- /Src/Build/readme.txt: -------------------------------------------------------------------------------- 1 | To build docs, you need to have JRE (Java Runtime Environment) installed. -------------------------------------------------------------------------------- /Src/.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/.nuget/NuGet.exe -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Envers.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/NHibernate.Envers/Envers.snk -------------------------------------------------------------------------------- /Src/doc/Reference/images/lite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/images/lite.png -------------------------------------------------------------------------------- /Src/doc/Reference/images/NhLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/images/NhLogo.png -------------------------------------------------------------------------------- /Src/doc/Reference/images/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/images/overview.png -------------------------------------------------------------------------------- /Src/doc/Reference/images/AuthorWork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/images/AuthorWork.png -------------------------------------------------------------------------------- /Src/doc/Reference/images/fullcream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/images/fullcream.png -------------------------------------------------------------------------------- /Src/doc/Reference/support/lib/batik.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/support/lib/batik.jar -------------------------------------------------------------------------------- /Src/doc/Reference/support/lib/saxon.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/support/lib/saxon.jar -------------------------------------------------------------------------------- /Src/doc/Reference/support/lib/jai_core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/support/lib/jai_core.jar -------------------------------------------------------------------------------- /Src/doc/Reference/support/lib/jai_codec.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/support/lib/jai_codec.jar -------------------------------------------------------------------------------- /Src/doc/Reference/support/lib/rowan-0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/support/lib/rowan-0.1.jar -------------------------------------------------------------------------------- /Src/doc/Reference/images/EmployerEmployee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/images/EmployerEmployee.png -------------------------------------------------------------------------------- /Src/doc/Reference/images/nhibernate_logo_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/images/nhibernate_logo_a.png -------------------------------------------------------------------------------- /Src/doc/Reference/images/CustomerOrderProduct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/images/CustomerOrderProduct.png -------------------------------------------------------------------------------- /Src/doc/Reference/support/lib/saxon-dbxsl-extensions.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/support/lib/saxon-dbxsl-extensions.jar -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Ids/CustomEnum.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.Ids 2 | { 3 | public enum CustomEnum 4 | { 5 | Yes, 6 | No 7 | } 8 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/Order.hbm.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/NHibernate.Envers.Tests/Entities/ManyToAny/Order.hbm.xml -------------------------------------------------------------------------------- /Src/doc/Reference/support/help2/NhibernateCollection_A.HxK: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/help2/NhibernateCollection_F.HxK: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/lib/fop-0.20.5-RFC3066-patched.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/support/lib/fop-0.20.5-RFC3066-patched.jar -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/Purchase.hbm.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/NHibernate.Envers.Tests/Entities/ManyToAny/Purchase.hbm.xml -------------------------------------------------------------------------------- /Src/doc/Reference/support/lib/avalon-framework-cvs-20020806.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/doc/Reference/support/lib/avalon-framework-cvs-20020806.jar -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/WirePayment.hbm.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/NHibernate.Envers.Tests/Entities/ManyToAny/WirePayment.hbm.xml -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/CreditCardPayment.hbm.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhibernate/nhibernate-envers/HEAD/Src/NHibernate.Envers.Tests/Entities/ManyToAny/CreditCardPayment.hbm.xml -------------------------------------------------------------------------------- /Src/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/AuditStrategyForTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests 2 | { 3 | public enum AuditStrategyForTest 4 | { 5 | DefaultAuditStrategy, 6 | ValidityAuditStrategy 7 | } 8 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/NotAuditedEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class NotAuditedEntity 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Entities/Mapper/Id/ISimpleIdMapperBuilder.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Entities.Mapper.Id 2 | { 3 | public interface ISimpleIdMapperBuilder: IIdMapper, ISimpleMapperBuilder 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Components/IComponent.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Components 2 | { 3 | public interface IComponent 4 | { 5 | string Data { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Entities/Mapper/ISimpleMapperBuilder.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Entities.Mapper 2 | { 3 | public interface ISimpleMapperBuilder 4 | { 5 | void Add(PropertyData propertyData); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/InheritedRevisionEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class InheritedRevisionEntity : DefaultRevisionEntity 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Attributes/RelationTargetAuditMode.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Configuration.Attributes 2 | { 3 | public enum RelationTargetAuditMode 4 | { 5 | Audited, 6 | NotAudited 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/html/docbookng.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Mixed/IActivity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Mixed 2 | { 3 | public interface IActivity 4 | { 5 | ActivityId Id { get; } 6 | int SequenceNumber { get; } 7 | } 8 | } -------------------------------------------------------------------------------- /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools":{ 5 | "csharpasyncgenerator.tool": { 6 | "version": "0.22.0", 7 | "commands": [ 8 | "async-generator" 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Component/BaseClassComponent.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Component 2 | { 3 | public class BaseClassComponent 4 | { 5 | public string Data1 { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Relation/ISetRefEdEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Relation 2 | { 3 | public interface ISetRefEdEntity 4 | { 5 | int Id { get; set; } 6 | string Data { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Entities/Mapper/Relation/Lazy/Initializor/IInitializor.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Entities.Mapper.Relation.Lazy.Initializor 2 | { 3 | public partial interface IInitializor 4 | { 5 | object Initialize(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Criteria/IExtendableCriterion.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Query.Criteria 2 | { 3 | public interface IExtendableCriterion : IAuditCriterion 4 | { 5 | IExtendableCriterion Add(IAuditCriterion criterion); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/EntityInstantiation/IExternalContext.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.EntityInstantiation 2 | { 3 | public interface IExternalContext 4 | { 5 | string ContextName { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/MethodEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class MethodEntity 4 | { 5 | public int SomeMethod() 6 | { 7 | return 0; 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/InheritedRevEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Entities.RevEntity 4 | { 5 | [RevisionEntity] 6 | public class InheritedRevEntity : CustomRevEntity 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/AuditReader/NotAuditedTestEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.AuditReader 2 | { 3 | public class NotAuditedTestEntity 4 | { 5 | public virtual int Id { get; set; } 6 | public virtual string Data { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/RevListener.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class RevListener : IRevisionListener 4 | { 5 | public void NewRevision(object revisionEntity) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Entities/EmptyChildEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Entities 4 | { 5 | [Audited] 6 | public class EmptyChildEntity : ParentEntity 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/RevisionEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class RevisionEntity 4 | { 5 | public virtual long Number { get; set; } 6 | public virtual long Timestamp { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/IPayment.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.ManyToAny 2 | { 3 | public interface IPayment 4 | { 5 | bool? IsSuccessful { get; set; } 6 | decimal? Amount { get; set; } 7 | string CardNumber { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Impl/IAuditQueryImplementor.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Query.Projection; 2 | 3 | namespace NHibernate.Envers.Query.Impl 4 | { 5 | public interface IAuditQueryImplementor : IAuditQuery 6 | { 7 | void RegisterProjection(string entityName, IAuditProjection projection); 8 | } 9 | } -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-dtd/README: -------------------------------------------------------------------------------- 1 | README for the DocBook XML DTD 2 | 3 | For more information about DocBook, please see 4 | 5 | http://www.oasis-open.org/docbook/ 6 | 7 | Please send all questions, comments, concerns, and bug reports to the 8 | DocBook mailing list: docbook@lists.oasis-open.org 9 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/fo/docbookng.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Mixed/CheckInActivity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Mixed 4 | { 5 | [Audited] 6 | public class CheckInActivity : AbstractCheckActivity 7 | { 8 | 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/EntityInstantiation/TestExternalContext.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.EntityInstantiation 2 | { 3 | public class TestExternalContext : IExternalContext 4 | { 5 | public string ContextName { get { return "Test Context"; } } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/NotAuditedOwnerEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class NotAuditedOwnerEntity 4 | { 5 | public NotAuditedEntity RelationField; 6 | public virtual NotAuditedEntity Relation { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Joined/Relation/Unidirectional/SetEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Joined.Relation.Unidirectional 4 | { 5 | [Audited] 6 | public class SetEntity : AbstractSetEntity 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/OneToManyNotAudited/Person.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.EntityNames.OneToManyNotAudited 2 | { 3 | public class Person 4 | { 5 | public virtual long Id { get; set; } 6 | public virtual string Name { get; set; } 7 | public virtual int Age { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Joined/Relation/Unidirectional/ContainedEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Joined.Relation.Unidirectional 4 | { 5 | [Audited] 6 | public class ContainedEntity : AbstractContainedEntity 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/NotFoundIgnore/BaseType/ChildName.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.NotFoundIgnore.BaseType 4 | { 5 | public class ChildName 6 | { 7 | public virtual Guid Id { get; set; } 8 | public virtual string Name { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/ValidityTestBase.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace NHibernate.Envers.Tests 4 | { 5 | [TestFixture] 6 | public abstract class ValidityTestBase : OneStrategyTestBase 7 | { 8 | protected ValidityTestBase() 9 | : base(AuditStrategyForTest.ValidityAuditStrategy) 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Entities/PersonalContact.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Entities 4 | { 5 | [Audited] 6 | public class PersonalContact : Contact 7 | { 8 | public virtual string FirstName { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/BidirectionalSameColumn/ModelConfigurationShared.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.BidirectionalSameColumn 2 | { 3 | public class ModelConfigurationShared 4 | { 5 | public virtual int Id { get; set; } 6 | 7 | public virtual ModelShared Model { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/FieldEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class FieldEntity 4 | { 5 | #pragma warning disable 0169 6 | private object data1; 7 | #pragma warning restore 0169 8 | 9 | public object data2 { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/SingleAssociatedNotAudited/Person.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.EntityNames.SingleAssociatedNotAudited 2 | { 3 | public class Person 4 | { 5 | public virtual long Id { get; set; } 6 | public virtual string Name { get; set; } 7 | public virtual int Age { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Component/DerivedClassComponent.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Component 2 | { 3 | /// 4 | /// Derives from BaseClassComponent, so it includes Data1. 5 | /// 6 | public class DerivedClassComponent : BaseClassComponent 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Transaction/NoSchemaEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Transaction 5 | { 6 | [Audited] 7 | public class NoSchemaEntity 8 | { 9 | public virtual Guid Id { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/TestExceptionRevisionListener.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Tests.Entities.RevEntity 4 | { 5 | public class TestExceptionRevisionListener : IRevisionListener 6 | { 7 | public void NewRevision(object revisionEntity) 8 | { 9 | throw new Exception(); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/AuditReader/AuditedTestEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.AuditReader 4 | { 5 | public class AuditedTestEntity 6 | { 7 | public virtual int Id { get; set; } 8 | [Audited] 9 | public virtual string Data { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/AllAudited/ISimple.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.AllAudited 4 | { 5 | [Audited] 6 | public interface ISimple 7 | { 8 | long Id { get; set; } 9 | string Data { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | The Envers project aims to enable easy auditing of persistent classes. 2 | 3 | Docs 4 | https://nhibernate.info/doc/envers/ 5 | 6 | Send user questions to NH user group list 7 | http://groups.google.com/group/nhusers 8 | 9 | Available as a nuget package 10 | http://nuget.org/packages/NHibernate.Envers 11 | 12 | Pull requests are welcome! 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/ManyToMany/InverseToSuperclass/DetailSubclass.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.ManyToMany.InverseToSuperclass 4 | { 5 | [Audited] 6 | public class DetailSubclass : DetailSuperclass 7 | { 8 | public virtual string Str2 { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/ManyToMany/InverseToSuperclass/DetailSubclass2.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.ManyToMany.InverseToSuperclass 4 | { 5 | [Audited] 6 | public class DetailSubclass2 : DetailSubclass 7 | { 8 | public virtual string Str3 { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/OneToMany/InverseToSuperclass/DetailSubclass.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.OneToMany.InverseToSuperclass 4 | { 5 | [Audited] 6 | public class DetailSubclass : DetailSuperclass 7 | { 8 | public virtual string Str2 { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/OneToMany/InverseToSuperclass/DetailSubclass2.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.OneToMany.InverseToSuperclass 4 | { 5 | [Audited] 6 | public class DetailSubclass2 : DetailSubclass 7 | { 8 | public virtual string Str3 { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/SomePropsEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class SomePropsEntity 4 | { 5 | public int Number { get; set; } 6 | public string String { get; set; } 7 | public string String2 { get; set; } 8 | public int FieldNumber; 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/CustomMapping/UserCollection/ISpecialCollection.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.CustomMapping.UserCollection 4 | { 5 | public interface ISpecialCollection : IList 6 | { 7 | int ItemsOverLimit(); 8 | int Limit { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/CustomType/ParametrizedCustomTypeEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Entities.CustomType 4 | { 5 | public class ParametrizedCustomTypeEntity 6 | { 7 | public virtual int Id { get; set; } 8 | [Audited] 9 | public virtual string Str { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/AllAudited/Union/UnionAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.AllAudited.Union 2 | { 3 | public class UnionAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public UnionAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/ManyToOne/LazyProperty/Person.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.ManyToOne.LazyProperty 4 | { 5 | [Audited] 6 | public class Person 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual string Name { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/doc/Reference/support/help2/Install Documentation In VS .NET Help.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ------------------------------------------------------ 3 | echo Install the documentation in Visual Studio .NET help 4 | echo Make sure that NAnt and H2Reg are correctly installed! 5 | echo ------------------------------------------------------ 6 | echo ... 7 | NAnt install 8 | echo on 9 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Entities.ManyToAny 5 | { 6 | [Audited] 7 | public class Order 8 | { 9 | public virtual Guid OrderId { get; set; } 10 | public virtual IPayment Payment { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/AllAudited/Joined/JoinedAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.AllAudited.Joined 2 | { 3 | public class JoinedAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public JoinedAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/MultiLevelInheritance/Child.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.MultiLevelInheritance 4 | { 5 | [Audited] 6 | public class Child 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual Parent Parent { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/CustomType/CompositeCustomTypeEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Entities.CustomType 4 | { 5 | public class CompositeCustomTypeEntity 6 | { 7 | public virtual int Id { get; set; } 8 | 9 | [Audited] 10 | public virtual Component Component { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/TestRevisionListener.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.RevEntity 2 | { 3 | public class TestRevisionListener : IRevisionListener 4 | { 5 | public static string Data = "data0"; 6 | 7 | public void NewRevision(object revisionEntity) 8 | { 9 | ((ListenerRevEntity)revisionEntity).Data = Data; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited/Union/UnionAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited.Union 2 | { 3 | public class UnionAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public UnionAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/CustomType/CLOBCustomTypeEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.CustomType 4 | { 5 | public class CLOBCustomTypeEntity 6 | { 7 | public virtual int Id { get; set; } 8 | [Audited] 9 | public virtual string Str { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/MultiLevelInheritance/InheritedParent.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.MultiLevelInheritance 4 | { 5 | [Audited] 6 | public class InheritedParent : Parent 7 | { 8 | public virtual string InheritedProperty { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/help2/Uninstall Documentation In VS .NET Help.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo -------------------------------------------------------- 3 | echo Uninstall the documentation from Visual Studio .NET help 4 | echo Make sure that NAnt and H2Reg are correctly installed! 5 | echo -------------------------------------------------------- 6 | echo ... 7 | NAnt uninstall 8 | echo on 9 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/AllAudited/Subclass/SubclassAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.AllAudited.Subclass 2 | { 3 | public class SubclassAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public SubclassAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited/Joined/JoinedAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited.Joined 2 | { 3 | public class JoinedAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public JoinedAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited2/Union/UnionAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited2.Union 2 | { 3 | public class UnionAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public UnionAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Access/None/SimpleProperty/Entity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Access.None.SimpleProperty 4 | { 5 | [Audited] 6 | public class Entity 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual int Data { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited2/Joined/JoinedAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited2.Joined 2 | { 3 | public class JoinedAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public JoinedAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/OneToMany/InverseToSuperclass/DetailSuperclass.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.OneToMany.InverseToSuperclass 4 | { 5 | [Audited] 6 | public class DetailSuperclass 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual Master Master { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Component/BaseClassOwner.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Component 4 | { 5 | [Audited] 6 | public class BaseClassOwner 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual BaseClassComponent Component { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/CustomMapping/UserCollection/Number.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.CustomMapping.UserCollection 4 | { 5 | [Audited] 6 | public class Number 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual int Value { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited/Subclass/SubclassAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited.Subclass 2 | { 3 | public class SubclassAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public SubclassAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Ctor/NonPublicCtorComponent.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Ctor 2 | { 3 | public class NonPublicCtorComponent 4 | { 5 | protected NonPublicCtorComponent() { } 6 | 7 | public NonPublicCtorComponent(string name) 8 | { 9 | Name = name; 10 | } 11 | 12 | public string Name { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/CustomType/PrimitiveCustomTypeEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Entities.CustomType 4 | { 5 | public class PrimitiveCustomTypeEntity 6 | { 7 | public virtual int Id { get; set; } 8 | 9 | [Audited] 10 | public virtual PrimitiveImmutableType PrimitiveType { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Collection/NoRevision/Name.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Collection.NoRevision 4 | { 5 | [Audited] 6 | public class Name 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual string TheName { get; set; } 10 | public virtual Person Person { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Mixed/AbstractActivity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Mixed 4 | { 5 | [Audited] 6 | public abstract class AbstractActivity : IActivity 7 | { 8 | public virtual ActivityId Id { get; set; } 9 | public virtual int SequenceNumber { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/AllAudited/NonAuditedImplementor.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.AllAudited 2 | { 3 | public class NonAuditedImplementor : ISimple 4 | { 5 | public virtual long Id { get; set; } 6 | public virtual string Data { get; set; } 7 | public virtual string NonAuditedImplementorData { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited/ISimple.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited 4 | { 5 | public interface ISimple 6 | { 7 | long Id { get; set; } 8 | string Data { get; set; } 9 | [Audited] 10 | int Number { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited2/Subclass/SubclassAllAuditedTest.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited2.Subclass 2 | { 3 | public class SubclassAllAuditedTest : AbstractAllAuditedTest 4 | { 5 | public SubclassAllAuditedTest(AuditStrategyForTest strategyType) : base(strategyType) 6 | { 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/BiDirOneToOneWithOneSideNotAudited/Child.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.BiDirOneToOneWithOneSideNotAudited 4 | { 5 | public class Child 6 | { 7 | public virtual Guid Id { get; set; } 8 | public virtual Parent Parent { get; set; } 9 | public virtual string Str { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Component/DerivedClassOwner.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Component 4 | { 5 | [Audited] 6 | public class DerivedClassOwner 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual DerivedClassComponent Component { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/AuditedEntity/Person.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.EntityNames.AuditedEntity 4 | { 5 | [Audited] 6 | public class Person 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual string Name { get; set; } 10 | public virtual int Age { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/BidirectionalSameColumn/ModelShared.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.BidirectionalSameColumn 4 | { 5 | public class ModelShared 6 | { 7 | public virtual int Id { get; set; } 8 | 9 | public virtual ISet ModelConfigurations { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Configuration/SimpleAuiditableForConfEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Configuration 4 | { 5 | [Audited] 6 | public class SimpleAuiditableForConfEntity 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual string Data { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/Build/buildDoc.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | SET SRCDIR=%~dp0 3 | set SRCDIR=%SRCDIR:~0,-7% 4 | set nugetfolder="%SRCDIR%\.nuget" 5 | set packageFolder="%SRCDIR%\packages" 6 | set msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" 7 | set configuration=Release 8 | set msbuildtasksVersion=1.4.0.65 9 | 10 | %msbuild% default.msbuild /v:n /t:BuildDocs 11 | echo ------------------------------- 12 | pause -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/OneToManyAudited/Person.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.EntityNames.OneToManyAudited 4 | { 5 | [Audited] 6 | public class Person 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual string Name { get; set; } 10 | public virtual int Age { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/ManyToOne/LazyProperty/Car.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.ManyToOne.LazyProperty 4 | { 5 | [Audited] 6 | public class Car 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual int Number { get; set; } 10 | public virtual Person Owner { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Generated/SimpleEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Generated 4 | { 5 | public class SimpleEntity { 6 | 7 | public virtual int Id { get; set; } 8 | 9 | [Audited] 10 | public virtual string Data { get; set; } 11 | 12 | [Audited] 13 | public virtual int CaseNumberInsert { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/TestBase.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace NHibernate.Envers.Tests 4 | { 5 | [TestFixture(AuditStrategyForTest.DefaultAuditStrategy)] 6 | [TestFixture(AuditStrategyForTest.ValidityAuditStrategy)] 7 | public abstract class TestBase : OneStrategyTestBase 8 | { 9 | protected TestBase(AuditStrategyForTest strategyType) : base(strategyType) 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited2/ISimple.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited2 4 | { 5 | public interface ISimple 6 | { 7 | long Id { get; set; } 8 | [Audited] 9 | string Data { get; set; } 10 | [Audited] 11 | int Number { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Exceptions/NotAuditedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Exceptions 4 | { 5 | [Serializable] 6 | public class NotAuditedException : AuditException 7 | { 8 | public NotAuditedException(string entityName, string message) 9 | : base(message) 10 | { 11 | EntityName = entityName; 12 | } 13 | 14 | public string EntityName { get; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/SingleAssociatedAudited/Person.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.EntityNames.SingleAssociatedAudited 4 | { 5 | [Audited] 6 | public class Person 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual string Name { get; set; } 10 | public virtual int Age { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/Purchase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NHibernate.Envers.Configuration.Attributes; 4 | 5 | namespace NHibernate.Envers.Tests.Entities.ManyToAny 6 | { 7 | [Audited] 8 | public class Purchase 9 | { 10 | public virtual Guid PurchaseId { get; set; } 11 | public virtual ISet Payments { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Mixed/AbstractCheckActivity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Mixed 4 | { 5 | [Audited] 6 | public abstract class AbstractCheckActivity : AbstractActivity 7 | { 8 | public virtual int DurationInMinutes { get; set; } 9 | public virtual IActivity RelatedActivity { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Attributes/NotAuditedAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Configuration.Attributes 4 | { 5 | /// 6 | /// When applied to a field, indicates that this field should not be audited. 7 | /// 8 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] 9 | public sealed class NotAuditedAttribute : Attribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/Inheritance.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 2 | { 3 | public class Animal 4 | { 5 | #pragma warning disable 0169 6 | private int weight; 7 | #pragma warning restore 0169 8 | 9 | public string Name { get; set; } 10 | } 11 | 12 | public class Dog : Animal 13 | { 14 | } 15 | 16 | public class Cat : Animal { } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/RevisionEntityWithEntityNames.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 4 | { 5 | public class RevisionEntityWithEntityNames 6 | { 7 | public virtual long Number { get; set; } 8 | public virtual long Timestamp { get; set; } 9 | public virtual ISet EntityNames { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Tools/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | 3 | namespace NHibernate.Envers.Tests.Tools 4 | { 5 | public static class StringExtensions 6 | { 7 | public static string ReplaceCaseInsensitive(this string theString, string oldValue, string newValue) 8 | { 9 | var regEx = new Regex(oldValue, RegexOptions.IgnoreCase); 10 | return regEx.Replace(theString, newValue); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/ManyToMany/InverseToSuperclass/DetailSuperclass.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.ManyToMany.InverseToSuperclass 5 | { 6 | [Audited] 7 | public class DetailSuperclass 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual IList Masters { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Configuration/Incorrect/Model.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Configuration.Incorrect 4 | { 5 | public class BaseEntity 6 | { 7 | public virtual int Id { get; set; } 8 | } 9 | 10 | [Audited] 11 | public class ConcreteEntity 12 | { 13 | public virtual int Data { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/ManyToOne/LazyProperty/Bidirectional/Car.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.ManyToOne.LazyProperty.Bidirectional 4 | { 5 | [Audited] 6 | public class Car 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual int Number { get; set; } 10 | public virtual Person Owner { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Entities/Mapper/IExtendedPropertyMapper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Engine; 3 | 4 | namespace NHibernate.Envers.Entities.Mapper 5 | { 6 | public interface IExtendedPropertyMapper: IPropertyMapper, ICompositeMapperBuilder 7 | { 8 | bool Map(ISessionImplementor session, IDictionary data, string[] propertyNames, object[] newState, object[] oldState); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Basic/NonAuditedEntity.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Criteria/IAuditCriterion.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration; 2 | using NHibernate.Envers.Reader; 3 | using NHibernate.Envers.Tools.Query; 4 | 5 | namespace NHibernate.Envers.Query.Criteria 6 | { 7 | public interface IAuditCriterion 8 | { 9 | void AddToQuery(AuditConfiguration auditCfg, IAuditReaderImplementor versionsReader, string entityName, QueryBuilder qb, Parameters parameters); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/TrackModifiedEntities/ExtendedRevisionEntity .cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Entities.RevEntity.TrackModifiedEntities 4 | { 5 | [RevisionEntity(typeof(ExtendedRevisionListener))] 6 | public class ExtendedRevisionEntity : DefaultTrackingModifiedEntitiesRevisionEntity 7 | { 8 | public virtual string Comment { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/NotFoundIgnore/BaseType/Parent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NHibernate.Envers.Configuration.Attributes; 4 | 5 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.NotFoundIgnore.BaseType 6 | { 7 | [Audited] 8 | public class Parent 9 | { 10 | public virtual Guid Id { get; set; } 11 | public virtual IList Children { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Entities/Contact.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Entities 5 | { 6 | [Audited] 7 | public class Contact 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual string Email { get; set; } 11 | public virtual ISet
Addresses { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Merge/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Configuration/Naming/Model.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Configuration.Naming 4 | { 5 | [Audited] 6 | public abstract class Base 7 | { 8 | public virtual int Id { get; set; } 9 | } 10 | 11 | [Audited] 12 | public class Concrete : Base 13 | { 14 | public virtual int Data { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/EnumType/Model.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.EnumType 4 | { 5 | [Audited] 6 | public class Entity 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual EntityEnum EntityEnum { get; set; } 10 | } 11 | 12 | public enum EntityEnum 13 | { 14 | TypeA = 'A', 15 | TypeB = 'B' 16 | } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Metadata/DefaultAuditEntityFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Tools.Reflection; 3 | 4 | namespace NHibernate.Envers.Configuration.Metadata 5 | { 6 | [Serializable] 7 | public class DefaultAuditEntityFactory : IEntityFactory 8 | { 9 | public object Instantiate(System.Type entityType) 10 | { 11 | return ReflectionTools.CreateInstanceByDefaultConstructor(entityType); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Metadata/DefaultEnversPostInstantiationListener.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Event; 3 | 4 | namespace NHibernate.Envers.Configuration.Metadata 5 | { 6 | [Serializable] 7 | public class DefaultEnversPostInstantiationListener : IPostInstantiationListener 8 | { 9 | /// 10 | /// noop 11 | /// 12 | public void PostInstantiate(object entity) 13 | { 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Order/IAuditOrder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration; 3 | 4 | namespace NHibernate.Envers.Query.Order 5 | { 6 | public interface IAuditOrder 7 | { 8 | /// 9 | /// 10 | /// Configuration. 11 | /// A pair: (property name, ascending?). 12 | Tuple GetData(AuditConfiguration auditCfg); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/TrackModifiedEntities/ExtendedRevisionListener .cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.RevEntity.TrackModifiedEntities 2 | { 3 | public class ExtendedRevisionListener : IRevisionListener 4 | { 5 | public const string CommentValue = "Comment"; 6 | 7 | public void NewRevision(object revisionEntity) 8 | { 9 | ((ExtendedRevisionEntity) revisionEntity).Comment = CommentValue; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Basic/ScalePrecision.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/ManyToManyAudited/Car.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.EntityNames.ManyToManyAudited 5 | { 6 | [Audited] 7 | public class Car 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual int Number { get; set; } 11 | public virtual IList Owners { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/OneToManyAudited/Car.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.EntityNames.OneToManyAudited 5 | { 6 | [Audited] 7 | public class Car 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual int Number { get; set; } 11 | public virtual IList Owners { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/SortedSetAndMap/StrTestEntityComparer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Tests.Entities; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.SortedSetAndMap 5 | { 6 | public class StrTestEntityComparer : IComparer 7 | { 8 | public int Compare(StrTestEntity x, StrTestEntity y) 9 | { 10 | return y.Str.CompareTo(x.Str); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/RevEntity/TrackModifiedEntities/Car.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.RevEntity.TrackModifiedEntities 5 | { 6 | [Audited] 7 | public class Car 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual int Number { get; set; } 11 | public virtual IList Owners { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Ids/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited/NonAuditedImplementor.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited 2 | { 3 | public class NonAuditedImplementor : ISimple 4 | { 5 | public virtual long Id { get; set; } 6 | public virtual string Data { get; set; } 7 | public virtual int Number { get; set; } 8 | public virtual string NonAuditedImplementorData { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited2/NonAuditedImplementor.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited2 2 | { 3 | public class NonAuditedImplementor : ISimple 4 | { 5 | public virtual long Id { get; set; } 6 | public virtual string Data { get; set; } 7 | public virtual int Number { get; set; } 8 | public virtual string NonAuditedImplementorData { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/DynamicComponent/JoinWithDynamicComponent/Person.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.DynamicComponent.JoinWithDynamicComponent 4 | { 5 | [Audited] 6 | public class Person 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual string Name { get; set; } 10 | public virtual int Age { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Reader/IAuditReaderImplementor.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Engine; 2 | 3 | namespace NHibernate.Envers.Reader 4 | { 5 | /// 6 | /// An interface exposed by a VersionsReader to library-facing classes. 7 | /// 8 | public interface IAuditReaderImplementor : IAuditReader 9 | { 10 | ISessionImplementor SessionImplementor { get; } 11 | ISession Session { get; } 12 | FirstLevelCache FirstLevelCache { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/SingleAssociatedAudited/Car.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.EntityNames.SingleAssociatedAudited 4 | { 5 | [Audited] 6 | public class Car 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual int Number { get; set; } 10 | public virtual Person Owner { get; set; } 11 | public virtual Person Driver { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/ManyToMany/InverseToSuperclass/Master.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.ManyToMany.InverseToSuperclass 5 | { 6 | [Audited] 7 | public class Master 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual string Str { get; set; } 11 | public virtual IList Items { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/OneToMany/InverseToSuperclass/Master.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.OneToMany.InverseToSuperclass 5 | { 6 | [Audited] 7 | public class Master 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual string Str { get; set; } 11 | public virtual IList Items { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Ctor/StructComponentWithDefinedCtor.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Ctor 2 | { 3 | public struct StructComponentWithDefinedCtor 4 | { 5 | private int _value; 6 | 7 | public StructComponentWithDefinedCtor(int value) 8 | { 9 | _value = value; 10 | } 11 | 12 | public int Value 13 | { 14 | get { return _value; } 15 | set { _value = value; } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/MultiLevelInheritance/Parent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.MultiLevelInheritance 5 | { 6 | [Audited] 7 | public class Parent 8 | { 9 | public virtual int Id { get; set; } 10 | public virtual ISet Childs { get; set; } 11 | public virtual string Property { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Attributes/JoinAuditTableAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Configuration.Attributes 4 | { 5 | //In (Java) Envers - called "Secondary" instead of Join 6 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] 7 | public sealed class JoinAuditTableAttribute : Attribute 8 | { 9 | public string JoinTableName { get; set; } 10 | public string JoinAuditTableName { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/AllAudited/AuditedImplementor.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.AllAudited 4 | { 5 | [Audited] 6 | public class AuditedImplementor : ISimple 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual string Data { get; set; } 10 | public virtual string AuditedImplementorData { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Collection/NoRevision/Person.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.Collection.NoRevision 5 | { 6 | [Audited] 7 | public class Person 8 | { 9 | public Person() 10 | { 11 | Names = new HashSet(); 12 | } 13 | 14 | public virtual int Id { get; set; } 15 | public virtual ISet Names { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/ManyToOne/LazyProperty/Bidirectional/Person.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | using System.Collections.Generic; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.ManyToOne.LazyProperty.Bidirectional 5 | { 6 | [Audited] 7 | public class Person 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual string Name { get; set; } 11 | public virtual ISet Cars { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Transaction/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/.gitignore: -------------------------------------------------------------------------------- 1 | *.obj 2 | *.exe 3 | *.pdb 4 | *.user 5 | *.aps 6 | *.pch 7 | *.vspscc 8 | *_i.c 9 | *_p.c 10 | *.ncb 11 | *.suo 12 | *.tlb 13 | *.tlh 14 | *.bak 15 | *.cache 16 | *.ilk 17 | *.log 18 | *.lib 19 | *.sbr 20 | *.scc 21 | *.tokens 22 | [Bb]in 23 | [Db]ebug/ 24 | obj/ 25 | [Rr]elease/ 26 | *resharper* 27 | _ReSharper*/ 28 | [Tt]est[Rr]esult* 29 | [Bb]uild[Ll]og.* 30 | *.[Pp]ublish.xml 31 | SharedAssemblyInfo.* 32 | hibernate.cfg.xml 33 | .vs/ 34 | packages/ 35 | .idea/ 36 | Build/Deploy/ -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Metadata/Reader/IPersistentPropertiesSource.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Mapping; 3 | 4 | namespace NHibernate.Envers.Configuration.Metadata.Reader 5 | { 6 | public interface IPersistentPropertiesSource 7 | { 8 | IEnumerable DeclaredPersistentProperties { get; } 9 | Property VersionedProperty { get; } 10 | System.Type Class { get; } 11 | bool IsComponent { get; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/RevisionInfo/IRevisionInfoGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.RevisionInfo 2 | { 3 | public partial interface IRevisionInfoGenerator 4 | { 5 | void SaveRevisionData(ISession session, object revisionData); 6 | object Generate(); 7 | 8 | /// 9 | void EntityChanged(System.Type entityClass, string entityName, object entityId, RevisionType revisionType, object revisionEntity); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/NotInsertable/ManyToOne/ManyToOneNotInsertableEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.NotInsertable.ManyToOne 4 | { 5 | [Audited] 6 | public class ManyToOneNotInsertableEntity 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual int Number { get; set; } 10 | public virtual NotInsertableEntityType Type { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/EntityInstantiation/PostInstantiationListener.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Event; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.EntityInstantiation 4 | { 5 | public class PostInstantiationListener : IPostInstantiationListener 6 | { 7 | public void PostInstantiate(object entity) 8 | { 9 | var testEnt = (TestEntityWithContext)entity; 10 | testEnt.Context = new TestExternalContext(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Ids/ManyToOneIdNotAuditedTest.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/ManyToManyAudited/Person.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.EntityNames.ManyToManyAudited 5 | { 6 | [Audited] 7 | public class Person 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual string Name { get; set; } 11 | public virtual int Age { get; set; } 12 | public virtual IList Cars { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/SingleAssociatedNotAudited/Car.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.EntityNames.SingleAssociatedNotAudited 4 | { 5 | public class Car 6 | { 7 | public virtual long Id { get; set; } 8 | [Audited] 9 | public virtual int Number { get; set; } 10 | [Audited(TargetAuditMode = RelationTargetAuditMode.NotAudited)] 11 | public virtual Person Owner { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Configuration/Inheritance/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/RevInfo/RevEntityIncorrectListenerType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.RevInfo 5 | { 6 | [RevisionEntity(typeof(string))] 7 | public class RevEntityIncorrectListenerType 8 | { 9 | [RevisionNumber] 10 | public virtual long Id { get; set; } 11 | 12 | [RevisionTimestamp] 13 | public virtual DateTime Timestamp { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Entities/Mapper/ICompositeMapperBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Entities.Mapper 4 | { 5 | public interface ICompositeMapperBuilder : ISimpleMapperBuilder 6 | { 7 | ICompositeMapperBuilder AddComponent(PropertyData propertyData, string componentClassName); 8 | void AddComposite(PropertyData propertyData, IPropertyMapper propertyMapper); 9 | IDictionary Properties { get; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/RevEntity/TrackModifiedEntities/Person.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.RevEntity.TrackModifiedEntities 5 | { 6 | [Audited] 7 | public class Person 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual string Name { get; set; } 11 | public virtual int Age { get; set; } 12 | public virtual IList Cars { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Component/StructComponent2.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Component 2 | { 3 | public struct StructComponent2 4 | { 5 | public int Data2 { get; set; } 6 | 7 | public override bool Equals(object obj) 8 | { 9 | var casted = (StructComponent2)obj; 10 | return (Data2.Equals(casted.Data2)); 11 | } 12 | 13 | public override int GetHashCode() 14 | { 15 | return Data2.GetHashCode(); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Versioning/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/CreditCardPayment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Entities.ManyToAny 5 | { 6 | [Audited] 7 | public class CreditCardPayment : IPayment 8 | { 9 | public virtual Guid CreditCardPaymentId { get; set; } 10 | public bool? IsSuccessful { get; set; } 11 | public decimal? Amount { get; set; } 12 | public string CardNumber { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | // Setting ComVisible to false makes the types in this assembly not visible 4 | // to COM components. If you need to access a type in this assembly from 5 | // COM, set the ComVisible attribute to true on that type. 6 | [assembly: ComVisible(false)] 7 | 8 | // The following GUID is for the ID of the typelib if this project is exposed to COM 9 | [assembly: Guid("3a29c075-01bf-4c3c-ae78-78524b02ab4d")] 10 | 11 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Fluent/FluentException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace NHibernate.Envers.Configuration.Fluent 5 | { 6 | [Serializable] 7 | public class FluentException : Exception 8 | { 9 | public FluentException() 10 | { 11 | } 12 | 13 | public FluentException(string message) : base(message) 14 | { 15 | } 16 | 17 | public FluentException(string message, Exception inner) : base(message, inner) 18 | { 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Ids/EmbId.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.Ids 2 | { 3 | public class EmbId 4 | { 5 | public virtual int X { get; set; } 6 | public virtual int Y { get; set; } 7 | 8 | public override bool Equals(object obj) 9 | { 10 | var casted = obj as EmbId; 11 | if (casted == null) 12 | return false; 13 | return (X == casted.X && Y == casted.Y); 14 | } 15 | 16 | public override int GetHashCode() 17 | { 18 | return X ^ Y; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToAny/WirePayment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Entities.ManyToAny 5 | { 6 | [Audited] 7 | public class WirePayment : IPayment 8 | { 9 | public virtual Guid WirePaymentId { get; set; } 10 | public virtual bool? IsSuccessful { get; set; } 11 | public virtual decimal? Amount { get; set; } 12 | public virtual string CardNumber { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Query/Model.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Query 4 | { 5 | [Audited] 6 | public class Person 7 | { 8 | public Person() 9 | { 10 | Weight = new Weight(); 11 | } 12 | 13 | public virtual int Id { get; set; } 14 | public virtual Weight Weight { get; set; } 15 | } 16 | 17 | public class Weight 18 | { 19 | public virtual int Kilo { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/IEntityFactory.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers 2 | { 3 | /// 4 | /// Contract for instantiation of an entity 5 | /// 6 | public interface IEntityFactory 7 | { 8 | object Instantiate(System.Type type); 9 | } 10 | 11 | /// 12 | /// Strongly-typed version of IEntityFactory 13 | /// 14 | /// 15 | public interface IEntityFactory : IEntityFactory 16 | { 17 | TEntity Instantiate(); 18 | } 19 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Property/RevisionNumberPropertyName.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration; 2 | 3 | namespace NHibernate.Envers.Query.Property 4 | { 5 | /// 6 | /// Used for specifying restrictions on the revision number, corresponding to an audit entity. 7 | /// 8 | public class RevisionNumberPropertyName : IPropertyNameGetter 9 | { 10 | public string Get(AuditConfiguration auditCfg) 11 | { 12 | return auditCfg.AuditEntCfg.RevisionNumberPath; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Property/RevisionTypePropertyName.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration; 2 | 3 | namespace NHibernate.Envers.Query.Property 4 | { 5 | /// 6 | /// Used for specifying restrictions on the revision type, corresponding to an audit entity. 7 | /// 8 | public class RevisionTypePropertyName : IPropertyNameGetter 9 | { 10 | public string Get(AuditConfiguration auditCfg) 11 | { 12 | return auditCfg.AuditEntCfg.RevisionTypePropName; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/ModifiedFlags/Entities/ManyToMany/Professor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.ModifiedFlags.Entities.ManyToMany 5 | { 6 | [Audited] 7 | public class Professor 8 | { 9 | public Professor() 10 | { 11 | Students = new HashSet(); 12 | } 13 | 14 | public virtual int Id { get; set; } 15 | public virtual ISet Students { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/OneToOne/UniDirectional/UniRefIngMulIdEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | using NHibernate.Envers.Tests.Entities.Ids; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.OneToOne.UniDirectional 5 | { 6 | public class UniRefIngMulIdEntity 7 | { 8 | public virtual int Id { get; set; } 9 | 10 | [Audited] 11 | public virtual string Data { get; set; } 12 | 13 | [Audited] 14 | public virtual EmbIdTestEntity Reference { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Primitive/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Configuration/Inheritance/Model.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Configuration.Inheritance 4 | { 5 | [Audited] 6 | public class Super : Base 7 | { 8 | public virtual string Data { get; set; } 9 | } 10 | 11 | [Audited] 12 | public class Base 13 | { 14 | public virtual int Id { get; set; } 15 | 16 | [NotAudited] 17 | public virtual int Number { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/DynamicComponent/DynamicTestEntity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.DynamicComponent 5 | { 6 | [Audited] 7 | public class DynamicTestEntity 8 | { 9 | public DynamicTestEntity() 10 | { 11 | Properties = new Hashtable(); 12 | } 13 | 14 | public virtual int Id { get; set; } 15 | public virtual IDictionary Properties { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Query/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/OneToManyNotAudited/Car.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.EntityNames.OneToManyNotAudited 5 | { 6 | public class Car 7 | { 8 | public virtual long Id { get; set; } 9 | [Audited] 10 | public virtual int Number { get; set; } 11 | [Audited(TargetAuditMode = RelationTargetAuditMode.NotAudited)] 12 | public virtual IList Owners { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/ModifiedFlags/Entities/ManyToMany/Student.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.ModifiedFlags.Entities.ManyToMany 5 | { 6 | [Audited] 7 | public class Student 8 | { 9 | public Student() 10 | { 11 | Professors = new HashSet(); 12 | } 13 | 14 | public virtual int Id { get; set; } 15 | public virtual ISet Professors { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited/AuditedImplementor.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited 4 | { 5 | [Audited] 6 | public class AuditedImplementor : ISimple 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual string Data { get; set; } 10 | public virtual int Number { get; set; } 11 | public virtual string AuditedImplementorData { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Inheritance/PropertiesAudited2/AuditedImplementor.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Inheritance.PropertiesAudited2 4 | { 5 | [Audited] 6 | public class AuditedImplementor : ISimple 7 | { 8 | public virtual long Id { get; set; } 9 | public virtual string Data { get; set; } 10 | public virtual int Number { get; set; } 11 | public virtual string AuditedImplementorData { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/PropertyNull/EntityWithPrimitiveNullAsCamelcaseUnderscore.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.PropertyNull 4 | { 5 | [Audited] 6 | public class EntityWithPrimitiveNullAsCamelcaseUnderscore 7 | { 8 | private int? _value; 9 | 10 | public virtual int Id { get; set; } 11 | public virtual int? Value 12 | { 13 | get { return _value; } 14 | set { _value = value; } 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Components/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Access/Readonly/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/PropertyNull/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/RevInfo/RevEntityIncorrectListenerType.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/CustomRevEntity.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | cre_sequence 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Data/SerObj.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Data 4 | { 5 | [Serializable] 6 | public class SerObj 7 | { 8 | public virtual string Data { get; set; } 9 | 10 | public override bool Equals(object obj) 11 | { 12 | var other = obj as SerObj; 13 | if (other == null) 14 | return false; 15 | return other.Data.Equals(Data); 16 | } 17 | 18 | public override int GetHashCode() 19 | { 20 | return Data.GetHashCode(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/CustomType/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Collection/StringMapEntity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Entities.Collection 5 | { 6 | public class StringMapEntity 7 | { 8 | public StringMapEntity() 9 | { 10 | Strings = new Dictionary(); 11 | } 12 | 13 | public virtual int Id { get; set; } 14 | [Audited] 15 | public virtual IDictionary Strings { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/InheritedRevEntity.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | cre_sequence 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Attributes/ModifiedEntityNamesAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Configuration.Attributes 4 | { 5 | /// 6 | /// Marks a property which holds entity class names that have been modified during each revision. 7 | /// This annotation expects property of ]]> type. 8 | /// 9 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] 10 | public sealed class ModifiedEntityNamesAttribute : Attribute 11 | { 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Fluent/IAttributeProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Configuration.Fluent 4 | { 5 | /// 6 | /// Creates attributes based on fluent configuration. 7 | /// 8 | public interface IAttributeProvider 9 | { 10 | /// 11 | /// Creates corresponding member attributes 12 | /// 13 | /// The attributes 14 | IEnumerable Attributes(Cfg.Configuration nhConfiguration); 15 | } 16 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Exceptions/AuditException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace NHibernate.Envers.Exceptions 5 | { 6 | [Serializable] 7 | public class AuditException : HibernateException 8 | { 9 | public AuditException() 10 | { 11 | } 12 | 13 | public AuditException(string message) 14 | : base(message) 15 | { 16 | } 17 | 18 | public AuditException(string message, Exception innerException) 19 | : base(message, innerException) 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/DynamicComponent/JoinWithDynamicComponent/Car.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.DynamicComponent.JoinWithDynamicComponent 5 | { 6 | [Audited] 7 | public class Car 8 | { 9 | public virtual long Id { get; set; } 10 | public virtual int Number { get; set; } 11 | public virtual Person Owner { get; set; } 12 | public virtual IDictionary Properties { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/EntityNames/AuditedEntity/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Components/Component1.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Interfaces.Components 2 | { 3 | public class Component1 : IComponent 4 | { 5 | public virtual string Data { get; set; } 6 | 7 | public override bool Equals(object obj) 8 | { 9 | var casted = obj as Component1; 10 | if (casted == null) 11 | return false; 12 | return (Data.Equals(casted.Data)); 13 | } 14 | 15 | public override int GetHashCode() 16 | { 17 | return Data.GetHashCode(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Naming/Quotation/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/BiDirOneToOneWithOneSideNotAudited/Parent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.BiDirOneToOneWithOneSideNotAudited 5 | { 6 | [Audited] 7 | public class Parent 8 | { 9 | public virtual Guid Id { get; set; } 10 | 11 | [Audited(TargetAuditMode = RelationTargetAuditMode.NotAudited)] 12 | public virtual Child Child { get; set; } 13 | 14 | public virtual string Description { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/DynamicComponent/SingleProperty.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/HOW_TO_RUN_TESTS.txt: -------------------------------------------------------------------------------- 1 | 1. Build NHibernate.Envers.Test 2 | 2. Modify hibernate.cfg.xml to point to your database (if there's been modification of hibernate.cfg.xml.template after you pulled latest, your hibernate.cfg.xml need to reflect these changes) 3 | 3. Run the tests 4 | 5 | 6 | NHibernate Envers' tests are using Parameterized Test Fixtures 7 | http://www.nunit.org/index.php?p=testFixture&r=2.6 8 | to run (most) integration tests twice, once for DefaultAuditStrategy and once for ValidityAuditStrategy. 9 | Make sure you have a modern test runner! -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Strategy/SetOfValues/SetOfValuesTestEntity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Strategy.SetOfValues 5 | { 6 | [Audited] 7 | public class SetOfValuesTestEntity 8 | { 9 | public SetOfValuesTestEntity() 10 | { 11 | ChildValues = new HashSet(); 12 | } 13 | 14 | public virtual int Id { get; set; } 15 | public virtual ISet ChildValues { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/log4net.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Attributes/AuditTableAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Configuration.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Class)] 6 | public sealed class AuditTableAttribute : Attribute 7 | { 8 | public AuditTableAttribute(string value) 9 | { 10 | Value = value; 11 | Schema = string.Empty; 12 | Catalog = string.Empty; 13 | } 14 | 15 | public string Value { get; set; } 16 | public string Schema { get; set; } 17 | public string Catalog { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: CLSCompliant(true)] 5 | 6 | // Setting ComVisible to false makes the types in this assembly not visible 7 | // to COM components. If you need to access a type in this assembly from 8 | // COM, set the ComVisible attribute to true on that type. 9 | [assembly: ComVisible(false)] 10 | 11 | // The following GUID is for the ID of the typelib if this project is exposed to COM 12 | [assembly: Guid("db825f07-eb93-48bc-b65a-1f112c1f6a39")] 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/CustomDateRevEntity.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | cre_sequence 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Entities/ListModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NHibernate.Envers.Configuration.Attributes; 4 | 5 | namespace NHibernate.Envers.Tests.NetSpecific.Entities 6 | { 7 | [Audited] 8 | public class ListParent 9 | { 10 | public virtual Guid Id { get; set; } 11 | public virtual IList Children { get; set; } 12 | } 13 | 14 | [Audited] 15 | public class ListChild 16 | { 17 | public virtual Guid Id { get; set; } 18 | public virtual string Name { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Configuration/Incorrect/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/ExceptionListenerRevEntity.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | cre_sequence 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/NotInsertable/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/CustomMapping/ImplicitEnversCollectionType/Model.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.CustomMapping.ImplicitEnversCollectionType 5 | { 6 | [Audited] 7 | public class Parent 8 | { 9 | public virtual int Id { get; set; } 10 | public virtual IList Children { get; set; } 11 | } 12 | 13 | [Audited] 14 | public class Child 15 | { 16 | public virtual int Id { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/EntityInstantiation/FactoryCreatedTestEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.EntityInstantiation 4 | { 5 | [AuditFactory(typeof(TestEntityFactory))] 6 | [Audited] 7 | public class FactoryCreatedTestEntity : TestEntityWithContext 8 | { 9 | public FactoryCreatedTestEntity() 10 | { 11 | } 12 | 13 | public FactoryCreatedTestEntity(bool createdByFactory) 14 | : base(createdByFactory) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Attributes/RevisionTimestampAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Configuration.Attributes 4 | { 5 | /// 6 | /// Marks a property which will hold the timestamp of the revision in a revision entity, see 7 | /// . The value of this property will be automatically set by Envers. 8 | /// 9 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] 10 | public sealed class RevisionTimestampAttribute : Attribute 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Tools/Incrementor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Tools 4 | { 5 | /// 6 | /// Util class to get the incremental number for aliases and parameters 7 | /// 8 | /// 9 | /// Increment the value at each get. 10 | /// 11 | public class Incrementor : ICloneable 12 | { 13 | private int value; 14 | 15 | public int Get() 16 | { 17 | return value++; 18 | } 19 | 20 | public object Clone() 21 | { 22 | return new Incrementor {value = value}; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/AuditReader/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Collection/MapKey/IdMapKeyEntity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | using NHibernate.Envers.Tests.Entities; 4 | 5 | namespace NHibernate.Envers.Tests.Integration.Collection.MapKey 6 | { 7 | public class IdMapKeyEntity 8 | { 9 | public IdMapKeyEntity() 10 | { 11 | IdMap = new Dictionary(); 12 | } 13 | 14 | public virtual int Id { get; set; } 15 | [Audited] 16 | public virtual IDictionary IdMap { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/CustomMapping/UserCollection/Entity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.CustomMapping.UserCollection 4 | { 5 | [Audited] 6 | public class Entity 7 | { 8 | public Entity() 9 | { 10 | SpecialCollection = new SpecialCollection(10); 11 | } 12 | public virtual int Id { get; set; } 13 | [CustomCollectionMapper(typeof(CustomCollectionMapperFactory))] 14 | public virtual ISpecialCollection SpecialCollection { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/IdBag/ManyToMany/UniDirectional/UniOwning.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NHibernate.Envers.Configuration.Attributes; 4 | 5 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.IdBag.ManyToMany.UniDirectional 6 | { 7 | [Audited] 8 | public class UniOwning 9 | { 10 | public UniOwning() 11 | { 12 | Referencing = new List(); 13 | } 14 | 15 | public virtual Guid Id { get; set; } 16 | public virtual ICollection Referencing { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | [[NAME]] 4 | 5 | 6 | 7 | [[NAME]] 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | FIXME: 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/ListenerRevEntity.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | cre_sequence 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Generated/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Mixed/ActivityId.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Mixed 2 | { 3 | public class ActivityId 4 | { 5 | public virtual int Id1 { get; set; } 6 | public virtual int Id2 { get; set; } 7 | 8 | public override bool Equals(object obj) 9 | { 10 | var casted = obj as ActivityId; 11 | if (casted == null) 12 | return false; 13 | return Id1 == casted.Id1 && Id2 == casted.Id2; 14 | } 15 | 16 | public override int GetHashCode() 17 | { 18 | return Id1 ^ Id2; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Mixed/NormalActivity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Mixed 4 | { 5 | [Audited] 6 | public class NormalActivity : AbstractActivity 7 | { 8 | public override bool Equals(object obj) 9 | { 10 | var casted = obj as NormalActivity; 11 | if (casted == null) 12 | return false; 13 | return Id == casted.Id; 14 | } 15 | 16 | public override int GetHashCode() 17 | { 18 | return Id.GetHashCode(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/TablePerClass/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/CustomDataRevEntity.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | cre_sequence 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SuperClass/AuditOverride/Invalid/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/Model/SomeCollectionMapper.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Entities.Mapper; 2 | using NHibernate.Envers.Entities.Mapper.Relation; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model 5 | { 6 | public class SomeCollectionMapper : ICustomCollectionMapperFactory 7 | { 8 | public IPropertyMapper Create(CommonCollectionMapperData commonCollectionMapperData, MiddleComponentData elementComponentData, MiddleComponentData indexComponentData, bool embeddableElementType) 9 | { 10 | return null; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Store/IMetaDataAdder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Configuration.Store 4 | { 5 | /// 6 | /// Runs after has created entity metas. 7 | /// 8 | public interface IMetaDataAdder 9 | { 10 | /// 11 | /// Adds metadata to 12 | /// 13 | /// The orginal meta data 14 | void AddMetaDataTo(IDictionary currentMetaData); 15 | } 16 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Impl/RevisionEntityInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Query.Impl 2 | { 3 | public class RevisionEntityInfo : IRevisionEntityInfo 4 | { 5 | public RevisionEntityInfo(TEntity entity, TRevisionEntity revisionEntity, RevisionType operation) 6 | { 7 | Entity = entity; 8 | RevisionEntity = revisionEntity; 9 | Operation = operation; 10 | } 11 | 12 | public TEntity Entity { get; } 13 | public TRevisionEntity RevisionEntity { get; } 14 | public RevisionType Operation { get; } 15 | } 16 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Ids/DateEmbId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Tests.Entities.Ids 4 | { 5 | public class DateEmbId 6 | { 7 | public virtual DateTime X { get; set; } 8 | public virtual DateTime Y { get; set; } 9 | 10 | public override bool Equals(object obj) 11 | { 12 | var casted = obj as DateEmbId; 13 | if (casted == null) 14 | return false; 15 | return casted.X == X && casted.Y == Y; 16 | } 17 | 18 | public override int GetHashCode() 19 | { 20 | return X.GetHashCode() ^ Y.GetHashCode(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/InsertUpdateFalse/ChildComponent.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.InsertUpdateFalse 2 | { 3 | public class ChildComponent 4 | { 5 | public virtual int NoUpdateInsert { get; set; } 6 | 7 | public override bool Equals(object obj) 8 | { 9 | var casted = obj as ChildComponent; 10 | if (casted == null) 11 | return false; 12 | return NoUpdateInsert == casted.NoUpdateInsert; 13 | } 14 | 15 | public override int GetHashCode() 16 | { 17 | return NoUpdateInsert; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Synchronization/Work/IWorkUnitMergeDispatcher.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Synchronization.Work 2 | { 3 | /// 4 | /// Visitor patter dispatcher. 5 | /// 6 | public interface IWorkUnitMergeDispatcher 7 | { 8 | /// 9 | /// Shuold be invoked on the second work unit. 10 | /// 11 | /// First work unit (that is, the one added earlier). 12 | /// The work unit that is the result of the merge. 13 | IAuditWorkUnit Dispatch(IWorkUnitMergeVisitor first); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Synchronization/Work/IWorkUnitMergeVisitor.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Synchronization.Work 2 | { 3 | /// 4 | /// Visitor pattern visitor. All methods should be invoked on the first work unit. 5 | /// 6 | public interface IWorkUnitMergeVisitor 7 | { 8 | IAuditWorkUnit Merge(AddWorkUnit second); 9 | IAuditWorkUnit Merge(ModWorkUnit second); 10 | IAuditWorkUnit Merge(DelWorkUnit second); 11 | IAuditWorkUnit Merge(CollectionChangeWorkUnit second); 12 | IAuditWorkUnit Merge(FakeBidirectionalRelationWorkUnit second); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/figure.properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | figure.properties 4 | Properties associated with a figure 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Description 14 | 15 | The styling for figures. 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Joined/EmptyChild/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/NotUpdatable/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Entities/Mapper/ICustomCollectionMapperFactory.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Entities.Mapper.Relation; 2 | 3 | namespace NHibernate.Envers.Entities.Mapper 4 | { 5 | /// 6 | /// Creates a user defined for a collection. 7 | /// 8 | public interface ICustomCollectionMapperFactory 9 | { 10 | IPropertyMapper Create(CommonCollectionMapperData commonCollectionMapperData, 11 | MiddleComponentData elementComponentData, 12 | MiddleComponentData indexComponentData, 13 | bool embeddableElementType); 14 | } 15 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SuperClass/AuditedAtSuperclassLevel/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Join/NoAuditedCollection/Model.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Join.NoAuditedCollection 5 | { 6 | public class NotAudited 7 | { 8 | public virtual int Id { get; set; } 9 | } 10 | [Audited] 11 | public class Audited 12 | { 13 | public virtual int Id { get; set; } 14 | [NotAudited] 15 | public virtual ISet XCollection { get; set; } 16 | 17 | public virtual int Number { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Strategy/SetOfValues/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/example.properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | example.properties 4 | Properties associated with a example 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Description 14 | 15 | The styling for examples. 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/xref.properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | xref.properties 4 | Properties associated with cross-reference text 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Description 15 | 16 | This attribute set is used on cross reference text. 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SuperClass/AuditAtMethodSuperclassLevel/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/CustomMapping/UserCollection/SpecialCollection.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using System.Linq; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.CustomMapping.UserCollection 5 | { 6 | public class SpecialCollection : Collection, ISpecialCollection 7 | { 8 | public SpecialCollection(int limit) 9 | { 10 | Limit = limit; 11 | } 12 | 13 | public int Limit { get; private set; } 14 | 15 | public int ItemsOverLimit() 16 | { 17 | return this.Count(item => item.Value > Limit); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Metadata/AuditTableData.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Configuration.Metadata 2 | { 3 | public class AuditTableData 4 | { 5 | public AuditTableData(string auditEntityName, string auditTableName, string schema, string catalog) 6 | { 7 | AuditEntityName = auditEntityName; 8 | AuditTableName = auditTableName; 9 | Schema = schema; 10 | Catalog = catalog; 11 | } 12 | 13 | public string AuditEntityName { get; } 14 | public string AuditTableName { get; } 15 | public string Schema { get; } 16 | public string Catalog { get; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/IRevisionEntityInfo.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Query 2 | { 3 | /// 4 | /// Detailed result of a query over the history of an entity. 5 | /// 6 | /// The type of the entity. 7 | /// The type of RevisionEntity 8 | /// 9 | public interface IRevisionEntityInfo 10 | { 11 | TEntity Entity { get; } 12 | TRevisionEntity RevisionEntity { get; } 13 | RevisionType Operation { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Property/IPropertyNameGetter.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration; 2 | 3 | namespace NHibernate.Envers.Query.Property 4 | { 5 | /// 6 | /// Provides a function to get the name of a property, which is used in a query, to apply some restrictions on it. 7 | /// 8 | public interface IPropertyNameGetter 9 | { 10 | /// 11 | /// 12 | /// Audit configuration. 13 | /// Name of the property, to be used in a query. 14 | string Get(AuditConfiguration auditCfg); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/equation.properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | equation.properties 4 | Properties associated with a equation 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Description 14 | 15 | The styling for equations. 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/help2/NhibernateCollection.HxT: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/CustomRevEntityColumnMapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | cre_sequence 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/UnversionedStrTestEntity.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities 2 | { 3 | public class UnversionedStrTestEntity 4 | { 5 | public virtual int Id { get; set; } 6 | public virtual string Str { get; set; } 7 | 8 | public override bool Equals(object obj) 9 | { 10 | var other = obj as UnversionedStrTestEntity; 11 | if (other == null) 12 | return false; 13 | return Id == other.Id && Str.Equals(other.Str); 14 | } 15 | 16 | public override int GetHashCode() 17 | { 18 | return Id.GetHashCode() ^ Str.GetHashCode(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/EnumType/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Fluent/MethodTest.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Fluent; 2 | using NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent.Model; 3 | using NUnit.Framework; 4 | 5 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Fluent 6 | { 7 | [TestFixture] 8 | public class MethodTest 9 | { 10 | [Test] 11 | public void ExcludingMethodShouldThrow() 12 | { 13 | var cfg = new FluentConfiguration(); 14 | Assert.Throws(() => 15 | cfg.Audit() 16 | .Exclude(obj => obj.SomeMethod())); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Ids/EmbIdWithCustomType.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.Ids 2 | { 3 | public class EmbIdWithCustomType 4 | { 5 | public virtual int X { get; set; } 6 | public virtual CustomEnum CustomEnum { get; set; } 7 | 8 | public override bool Equals(object obj) 9 | { 10 | var casted = obj as EmbIdWithCustomType; 11 | if (casted == null) 12 | return false; 13 | return X == casted.X && CustomEnum == casted.CustomEnum; 14 | } 15 | 16 | public override int GetHashCode() 17 | { 18 | return X ^ CustomEnum.GetHashCode(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/procedure.properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | procedure.properties 4 | Properties associated with a procedure 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Description 14 | 15 | The styling for procedures. 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/TrackModifiedEntities/CustomEntityTrackingRevisionListener .cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.RevEntity.TrackModifiedEntities 2 | { 3 | public class CustomTrackingRevisionListener : IEntityTrackingRevisionListener 4 | { 5 | public void NewRevision(object revisionEntity) 6 | { 7 | } 8 | 9 | public void EntityChanged(System.Type entityClass, string entityName, object entityId, RevisionType revisionType, object revisionEntity) 10 | { 11 | ((CustomTrackingRevisionEntity)revisionEntity).AddModifiedEntityType(entityClass.FullName); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SameIds/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Join/NoAuditedProperties/Model.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Join.NoAuditedProperties 5 | { 6 | public class NotAudited 7 | { 8 | public virtual int Id { get; set; } 9 | } 10 | [Audited] 11 | public class Audited 12 | { 13 | public virtual int Id { get; set; } 14 | 15 | [NotAudited] 16 | public virtual ISet XCollection { get; set; } 17 | [NotAudited] 18 | public virtual int Number { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/hyphenate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | hyphenate 4 | 5 | 6 | 7 | hyphenate 8 | Specify hyphenation behavior 9 | 10 | 11 | 12 | true 13 | 14 | 15 | Description 16 | 17 | If true, words may be hyphenated. Otherwise, they may not. 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/CustomRevEntityFieldCamelcaseAccess.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | cre_sequence 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SuperClass/AuditedAtSuperclassLevel/AuditAllSubclass/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/BidirectionalSameColumn/Model.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.BidirectionalSameColumn 5 | { 6 | public class Model 7 | { 8 | public virtual int Id { get; set; } 9 | 10 | [Audited(TargetAuditMode = RelationTargetAuditMode.NotAudited)] 11 | [AuditJoinTable(TableName = "jointable")] //needed due to firebird limitation in table name length 12 | public virtual ISet ModelConfigurations { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Ctor/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Join/NoAuditedCollectionWithAudited/Model.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Join.NoAuditedCollectionWithAudited 5 | { 6 | public class NotAudited 7 | { 8 | public virtual int Id { get; set; } 9 | } 10 | [Audited] 11 | public class Audited 12 | { 13 | public virtual int Id { get; set; } 14 | 15 | [NotAudited] 16 | public virtual ISet XCollection { get; set; } 17 | 18 | public virtual int Number { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/alignment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | alignment 4 | 5 | 6 | 7 | alignment 8 | Specify the default text alignment 9 | 10 | 11 | 12 | justify 13 | 14 | 15 | Description 16 | 17 | The default text alignment is used for most body text. 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/RevEntity/CustomRevEntityFieldAccess.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | cre_sequence 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/DynamicComponent/MultipleProperty.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Tools/ArgumentsTools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Tools 4 | { 5 | public static class ArgumentsTools 6 | { 7 | public static void CheckNotNull(T o, string paramName) where T : class 8 | { 9 | if (o == null) 10 | { 11 | throw new ArgumentNullException(paramName, paramName + " cannot be null."); 12 | } 13 | } 14 | 15 | public static void CheckPositive(long i, string paramName) 16 | { 17 | if (i <= 0) 18 | { 19 | throw new ArgumentOutOfRangeException(paramName, paramName + " has to be greater than 0."); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/admonition.properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | admonition.properties 4 | To set the style for admonitions. 5 | 6 | 7 | 8 | 9 | 10 | 11 | Description 12 | How do you want admonitions styled? 13 | Set the font-size, weight, etc. to the style required 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Collection/MapKey/ComponentMapKeyEntity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | using NHibernate.Envers.Tests.Entities.Components; 4 | 5 | namespace NHibernate.Envers.Tests.Integration.Collection.MapKey 6 | { 7 | public class ComponentMapKeyEntity 8 | { 9 | public ComponentMapKeyEntity() 10 | { 11 | IdMap = new Dictionary(); 12 | } 13 | 14 | public virtual int Id { get; set; } 15 | [Audited] 16 | public virtual IDictionary IdMap { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SuperClass/AuditAtMethodSuperclassLevel/AuditAllSubclass/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Naming/Ids/EmbIdNaming.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Integration.Naming.Ids 2 | { 3 | public class EmbIdNaming 4 | { 5 | public int X { get; set; } 6 | public int Y { get; set; } 7 | 8 | public override bool Equals(object obj) 9 | { 10 | var casted = obj as EmbIdNaming; 11 | if (casted == null) 12 | return false; 13 | return X == casted.X && Y == casted.Y; 14 | } 15 | 16 | public override int GetHashCode() 17 | { 18 | return X ^ Y; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/EntityInstantiation/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Tools/ConfigurationExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | 3 | namespace NHibernate.Envers.Tests.Tools 4 | { 5 | public static class ConfigurationExtensions 6 | { 7 | public static Cfg.Configuration OverrideSettingsFromEnvironmentVariables(this Cfg.Configuration configuration) 8 | { 9 | foreach (var nhProperty in configuration.Properties.ToArray()) 10 | { 11 | var envVar = System.Environment.GetEnvironmentVariable(nhProperty.Key); 12 | if (envVar != null) 13 | { 14 | configuration.SetProperty(nhProperty.Key, envVar); 15 | } 16 | } 17 | 18 | return configuration; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/StringConfigurationEntry.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Configuration 4 | { 5 | public class StringConfigurationEntry : ConfigurationEntry 6 | { 7 | public StringConfigurationEntry(string key, string defaultValueAsString) 8 | : base(key, defaultValueAsString) 9 | { 10 | } 11 | 12 | public string ToString(IDictionary nhibernateProperties) 13 | { 14 | return PropertyValue(nhibernateProperties); 15 | } 16 | 17 | protected override string ToString(string value) 18 | { 19 | return value; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/process.source.toc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | process.source.toc 4 | boolean 5 | 6 | 7 | process.source.toc 8 | FIXME: 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | FIXME: 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Components/Relations/ManyToOneComponent.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.Components.Relations 2 | { 3 | public class ManyToOneComponent 4 | { 5 | public StrTestEntity Entity { get; set; } 6 | public string Data { get; set; } 7 | 8 | public override bool Equals(object obj) 9 | { 10 | var that = obj as ManyToOneComponent; 11 | if (that == null) 12 | return false; 13 | return Entity.Equals(that.Entity) && Data.Equals(that.Data); 14 | } 15 | 16 | public override int GetHashCode() 17 | { 18 | return Entity.GetHashCode() ^ Data.GetHashCode(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Joined/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Access/Readonly/ReadonlyEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.Access.Readonly 4 | { 5 | [Audited] 6 | public class ReadonlyEntity 7 | { 8 | private int _readonlyData; 9 | public virtual int Id { get; set; } 10 | public virtual int Data { get; set; } 11 | public virtual int ReadonlyData 12 | { 13 | get 14 | { 15 | return _readonlyData; 16 | } 17 | } 18 | 19 | public virtual void SetReadOnlyData(int value) 20 | { 21 | _readonlyData = value; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/RevisionType.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers 2 | { 3 | /// 4 | /// Type of the revision. 5 | /// 6 | public enum RevisionType 7 | { 8 | /// 9 | /// Indicates that the entity was added (persisted) at that revision. 10 | /// 11 | Added = 0, 12 | 13 | /// 14 | /// Indicates that the entity was modified (one or more of its fields) at that revision. 15 | /// 16 | Modified = 1, 17 | 18 | /// 19 | /// Indicates that the entity was deleted (removed) at that revision. 20 | /// 21 | Deleted = 2 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/shade.verbatim.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | shade.verbatim 4 | boolean 5 | 6 | 7 | shade.verbatim 8 | Should verbatim environments be shaded? 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | FIXME: 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/table.entry.padding.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | table.entry.padding 4 | 5 | 6 | 7 | table.entry.padding 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | FIXME: 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SuperClass/AuditedAtSuperclassLevel/AuditMethodSubclass/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Store/IEntityMeta.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | namespace NHibernate.Envers.Configuration.Store 6 | { 7 | /// 8 | /// Holds configuration information for an entity type 9 | /// 10 | public interface IEntityMeta 11 | { 12 | /// 13 | /// Metas for current class 14 | /// 15 | IEnumerable ClassMetas { get; } 16 | 17 | /// 18 | /// Member metas for current class 19 | /// 20 | IDictionary> MemberMetas { get; } 21 | } 22 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Ids/ManyToOneNotAuditedEmbId.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.Ids 2 | { 3 | public class ManyToOneNotAuditedEmbId 4 | { 5 | public virtual UnversionedStrTestEntity Id { get; set; } 6 | 7 | public override bool Equals(object obj) 8 | { 9 | var casted = obj as ManyToOneNotAuditedEmbId; 10 | if (casted == null) 11 | return false; 12 | if (Id != null ? !Id.Equals(casted.Id) : casted.Id != null) 13 | return false; 14 | 15 | return true; 16 | } 17 | 18 | public override int GetHashCode() 19 | { 20 | return Id != null ? Id.GetHashCode() : 0; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Joined/PrimaryKeyJoin/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SuperClass/AuditAtMethodSuperclassLevel/AuditMethodSubclass/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/olink.pubid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | olink.pubid 4 | string 5 | 6 | 7 | olink.pubid 8 | Names the public identifier portion of an OLink resolver query 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | FIXME: 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/olink.sysid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | olink.sysid 4 | string 5 | 6 | 7 | olink.sysid 8 | Names the system identifier portion of an OLink resolver query 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | FIXME: 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Components/Component2.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.Components 2 | { 3 | public class Component2 4 | { 5 | public virtual string Str5 { get; set; } 6 | public virtual string Str6 { get; set; } 7 | 8 | public override bool Equals(object obj) 9 | { 10 | var other = obj as Component2; 11 | if (obj == null || GetType() != obj.GetType()) 12 | { 13 | return false; 14 | } 15 | return Str5.Equals(other.Str5) && Str6.Equals(other.Str6); 16 | } 17 | 18 | public override int GetHashCode() 19 | { 20 | return Str5.GetHashCode() ^ Str6.GetHashCode(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/ConfigurationComparer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Configuration 4 | { 5 | public class ConfigurationComparer : IEqualityComparer 6 | { 7 | public bool Equals(Cfg.Configuration x, Cfg.Configuration y) 8 | { 9 | return ConfigurationKey.UniqueConfigurationName.ToString(x.Properties) 10 | .Equals(ConfigurationKey.UniqueConfigurationName.ToString(y.Properties)); 11 | } 12 | 13 | public int GetHashCode(Cfg.Configuration obj) 14 | { 15 | return ConfigurationKey.RevisionFieldName.ToString(obj.Properties).GetHashCode(); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Tools/Graph/IGraphDefiner.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Tools.Graph 4 | { 5 | /** 6 | * Defines a graph, where each vertex has a representation, which identifies uniquely a value. 7 | * Representations are comparable, values - not. 8 | * @author Simon Duduica, port of Envers omonyme class by Adam Warski (adam at warski dot org) 9 | */ 10 | public interface IGraphDefiner 11 | { 12 | R GetRepresentation(V v); 13 | V GetValue(R r); 14 | IEnumerable GetNeighbours(V v); 15 | IEnumerable GetValues(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/generate.index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | generate.index 4 | boolean 5 | 6 | 7 | generate.index 8 | Do you want an index? 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | Specify if an index should be generated. 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/points.per.em.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | points.per.em 4 | number 5 | 6 | 7 | points.per.em 8 | Specify the nominal size of an em-space in points 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | FIXME: 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Joined/Relation/Unidirectional/AbstractSetEntity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Joined.Relation.Unidirectional 5 | { 6 | [Audited] 7 | public abstract class AbstractSetEntity 8 | { 9 | protected AbstractSetEntity() 10 | { 11 | Entities = new HashSet(); 12 | } 13 | 14 | public virtual int Id { get; set; } 15 | [AuditJoinTable(TableName = "ASE_ACE_AUD")] 16 | public virtual ISet Entities { get; set; } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Single/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Interfaces/CovariantInterfacesTests.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Query; 2 | using NHibernate.Envers.Query.Impl; 3 | 4 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Interfaces 5 | { 6 | class CovariantInterfacesTests 7 | { 8 | private IRevisionEntityInfo This_test_will_only_compile_if_the_typeparameter_of_the_IRevisionEntityInfo_interface_are_defined_as_covariant() 9 | { 10 | return new RevisionEntityInfo(new CovariantToObject(), new CovariantToObject(), RevisionType.Added); 11 | } 12 | 13 | class CovariantToObject { } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/line-height.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | line-height 4 | string 5 | 6 | 7 | line-height 8 | Specify the line-height property 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | Sets the line-height property. 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/olink.fragid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | olink.fragid 4 | string 5 | 6 | 7 | olink.fragid 8 | Names the fragment identifier portion of an OLink resolver query 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | FIXME: 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/olink.outline.ext.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | olink.outline.ext 4 | string 5 | 6 | 7 | olink.outline.ext 8 | The extension of OLink outline files 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | FIXME: 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/olink.resolver.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | olink.resolver 4 | 5 | 6 | 7 | olink.resolver 8 | The root name of the OLink resolver (usually a script) 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | FIXME: 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Collection/NoRevision/CollectionChangeNoRevisionTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Collection.NoRevision 4 | { 5 | public class CollectionChangeNoRevisionTest : AbstractCollectionChangeTest 6 | { 7 | public CollectionChangeNoRevisionTest(AuditStrategyForTest strategyType) : base(strategyType) 8 | { 9 | } 10 | 11 | protected override bool RevisionOnCollectionChange 12 | { 13 | get { return false; } 14 | } 15 | 16 | protected override IEnumerable ExpectedPersonRevisions 17 | { 18 | get { return new long[] {1}; } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Collection/NoRevision/CollectionChangeRevisionTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Collection.NoRevision 4 | { 5 | public class CollectionChangeRevisionTest : AbstractCollectionChangeTest 6 | { 7 | public CollectionChangeRevisionTest(AuditStrategyForTest strategyType) : base(strategyType) 8 | { 9 | } 10 | 11 | protected override bool RevisionOnCollectionChange 12 | { 13 | get { return true; } 14 | } 15 | 16 | protected override IEnumerable ExpectedPersonRevisions 17 | { 18 | get { return new long[] { 1, 3 }; } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/UnitTests/Ids/CompositeIdNoComponentTest.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Cfg; 2 | using NHibernate.Envers.Exceptions; 3 | using NUnit.Framework; 4 | 5 | namespace NHibernate.Envers.Tests.NetSpecific.UnitTests.Ids 6 | { 7 | [TestFixture] 8 | public class CompositeIdNoComponentTest 9 | { 10 | [Test] 11 | public void ShouldThrowCorrectException() 12 | { 13 | var cfg = new Cfg.Configuration(); 14 | cfg.Configure(); 15 | cfg.AddResource("NHibernate.Envers.Tests.NetSpecific.UnitTests.Ids.Mapping.hbm.xml", GetType().Assembly); 16 | 17 | Assert.Throws(() => cfg.IntegrateWithEnvers()); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Exceptions/RevisionDoesNotExistException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace NHibernate.Envers.Exceptions 4 | { 5 | [Serializable] 6 | public class RevisionDoesNotExistException : AuditException 7 | { 8 | public RevisionDoesNotExistException(long revision) 9 | : base("Revision " + revision + " does not exist.") 10 | { 11 | Revision = revision; 12 | } 13 | 14 | public RevisionDoesNotExistException(DateTime date) 15 | : base("There is no revision before or at " + date + ".") 16 | { 17 | DateTime = date; 18 | } 19 | 20 | public long Revision { get; } 21 | public DateTime DateTime { get; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/footer.rule.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | footer.rule 4 | boolean 5 | 6 | 7 | footer.rule 8 | Rule over footers? 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | If non-zero, a rule will be drawn above the page footers. 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/generate.legalnotice.link.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | generate.legalnotice.link 4 | boolean 5 | 6 | 7 | generate.legalnotice.link 8 | TBD 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | TBD 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/header.rule.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | header.rule 4 | boolean 5 | 6 | 7 | header.rule 8 | Rule under headers? 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | If non-zero, a rule will be drawn below the page headers. 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/table.cell.border.style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | table.cell.border.style 4 | 5 | 6 | 7 | table.cell.border.style 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | FIXME: 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Configuration/Naming/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Entities/Mapper/Relation/Query/IRelationQueryGenerator.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Reader; 2 | 3 | namespace NHibernate.Envers.Entities.Mapper.Relation.Query 4 | { 5 | /// 6 | /// Implementations of this interface provide a method to generate queries on a relation table (a table used 7 | /// for mapping relations). The query can select, apart from selecting the content of the relation table, also data of 8 | /// other "related" entities. 9 | /// 10 | public interface IRelationQueryGenerator 11 | { 12 | IQuery GetQuery(IAuditReaderImplementor versionsReader, object primaryKey, long revision, bool removed); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/CustomType/PrimitiveImmutableType.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tests.Entities.CustomType 2 | { 3 | public class PrimitiveImmutableType 4 | { 5 | protected PrimitiveImmutableType() { } 6 | 7 | public char CharValue { get; protected set; } 8 | 9 | public int IntValue { get; protected set; } 10 | 11 | public static PrimitiveImmutableType Get(int intValue) 12 | { 13 | return new PrimitiveImmutableType 14 | { 15 | CharValue = testString.ToCharArray()[intValue], 16 | IntValue = intValue 17 | }; 18 | } 19 | 20 | private const string testString = "abcdefghijklmnopqrstuvwxyz"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/process.empty.source.toc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | process.empty.source.toc 4 | boolean 5 | 6 | 7 | process.empty.source.toc 8 | FIXME: 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | FIXME: 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/table.frame.border.style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | table.frame.border.style 4 | 5 | 6 | 7 | table.frame.border.style 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | FIXME: 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/toc.max.depth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | toc.max.depth 4 | integer 5 | 6 | 7 | toc.max.depth 8 | How maximaly deep should be each TOC? 9 | 10 | 11 | 12 | 8 13 | 14 | 15 | Description 16 | 17 | Specifies the maximal depth of TOC on all levels. 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Interfaces/Relation/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/OneToOne/OneToOneOwningEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.OneToOne 4 | { 5 | [Audited] 6 | public class OneToOneOwningEntity 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual OneToOneOwnedEntity Owned { get; set; } 10 | 11 | public override bool Equals(object obj) 12 | { 13 | var casted = obj as OneToOneOwningEntity; 14 | if (casted == null) 15 | return false; 16 | return (Id == casted.Id); 17 | } 18 | 19 | public override int GetHashCode() 20 | { 21 | return Id; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Configuration/Store/IMetaDataProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace NHibernate.Envers.Configuration.Store 4 | { 5 | /// 6 | /// Knows how to create configuration data 7 | /// 8 | public interface IMetaDataProvider 9 | { 10 | /// 11 | /// Creates the meta data. Normally not used by user. 12 | /// 13 | /// The NH Configuration. 14 | /// 15 | /// A dictionary of , keyed by entity type 16 | /// 17 | IDictionary CreateMetaData(Cfg.Configuration nhConfiguration); 18 | } 19 | } -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/default.float.class.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | default.float.class 4 | string 5 | 6 | 7 | default.float.class 8 | Specifies the default float class 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | FIXME: 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Joined/Relation/Unidirectional/AbstractContainedEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Joined.Relation.Unidirectional 4 | { 5 | [Audited] 6 | public abstract class AbstractContainedEntity 7 | { 8 | public virtual long Id { get; set; } 9 | 10 | public override bool Equals(object obj) 11 | { 12 | var casted = obj as AbstractContainedEntity; 13 | if (casted == null) 14 | return false; 15 | return Id == casted.Id; 16 | } 17 | 18 | public override int GetHashCode() 19 | { 20 | return Id.GetHashCode(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Naming/Estonia.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SameIds/SameIdTestEntity1.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.SameIds 4 | { 5 | public class SameIdTestEntity1 6 | { 7 | public virtual int Id { get; set; } 8 | [Audited] 9 | public virtual string Str1 { get; set; } 10 | 11 | public override bool Equals(object obj) 12 | { 13 | var other = obj as SameIdTestEntity1; 14 | if (other == null) 15 | return false; 16 | return Id == other.Id && Str1.Equals(other.Str1); 17 | } 18 | 19 | public override int GetHashCode() 20 | { 21 | return Id.GetHashCode() ^ Str1.GetHashCode(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/SameIds/SameIdTestEntity2.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.SameIds 4 | { 5 | public class SameIdTestEntity2 6 | { 7 | public virtual int Id { get; set; } 8 | [Audited] 9 | public virtual string Str1 { get; set; } 10 | 11 | public override bool Equals(object obj) 12 | { 13 | var other = obj as SameIdTestEntity2; 14 | if (other == null) 15 | return false; 16 | return Id == other.Id && Str1.Equals(other.Str1); 17 | } 18 | 19 | public override int GetHashCode() 20 | { 21 | return Id.GetHashCode() ^ Str1.GetHashCode(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Access/None/SimpleProperty/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Setup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Reflection; 4 | using log4net; 5 | using log4net.Config; 6 | using NUnit.Framework; 7 | 8 | namespace NHibernate.Envers.Tests 9 | { 10 | [SetUpFixture] 11 | public class Setup 12 | { 13 | [OneTimeSetUp] 14 | public void RunOnce() 15 | { 16 | var log4netConf = new FileInfo(Environment.CurrentDirectory + @"\log4net.xml"); 17 | var entryAssembly = Assembly.GetEntryAssembly(); 18 | if (entryAssembly != null) 19 | { 20 | var logRepository = LogManager.GetRepository(entryAssembly); 21 | XmlConfigurator.Configure(logRepository, log4netConf); 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Tools/StringTools.cs: -------------------------------------------------------------------------------- 1 | namespace NHibernate.Envers.Tools 2 | { 3 | public static class StringTools 4 | { 5 | /// 6 | /// 7 | /// String, from which to get the last component. 8 | /// 9 | /// The last component of the dot-separated string s. For example, for a string 10 | /// * "a.b.c", the result is "c". 11 | /// 12 | public static string GetLastComponent(string s) 13 | { 14 | if (s == null) 15 | { 16 | return null; 17 | } 18 | 19 | var lastDot = s.LastIndexOf("."); 20 | return lastDot == -1 ? s : s.Substring(lastDot + 1); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/column.count.body.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | column.count.body 4 | integer 5 | 6 | 7 | column.count.body 8 | Number of columns on body pages 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | Number of columns on body pages. 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/table.cell.border.thickness.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | table.cell.border.thickness 4 | 5 | 6 | 7 | table.cell.border.thickness 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | FIXME: 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Data/SerializableTestEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Data 4 | { 5 | public class SerializableTestEntity 6 | { 7 | public virtual int Id { get; set; } 8 | [Audited] 9 | public virtual SerObj Obj { get; set; } 10 | 11 | public override bool Equals(object obj) 12 | { 13 | var other = obj as SerializableTestEntity; 14 | if (other == null) 15 | return false; 16 | return other.Id == Id && other.Obj.Equals(Obj); 17 | } 18 | 19 | public override int GetHashCode() 20 | { 21 | return Id.GetHashCode() ^ Obj.GetHashCode(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Strategy/Model/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/Query/RelationIn/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/body.font.family.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | body.font.family 4 | 5 | 6 | 7 | body.font.family 8 | The default font family for body text 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | The body font family is the default font used for text in the page body. 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/column.count.index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | column.count.index 4 | integer 5 | 6 | 7 | column.count.index 8 | Number of columns on index pages 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | Number of columns on index pages. 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/ManyToMany/IntNoAutoIdTestEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Entities.ManyToMany 4 | { 5 | public class IntNoAutoIdTestEntity 6 | { 7 | public virtual int Id { get; set; } 8 | 9 | [Audited] 10 | public virtual int Number { get; set; } 11 | 12 | public override bool Equals(object obj) 13 | { 14 | var casted = obj as IntNoAutoIdTestEntity; 15 | if (casted == null) 16 | return false; 17 | return (Id == casted.Id && Number == casted.Number); 18 | } 19 | 20 | public override int GetHashCode() 21 | { 22 | return Id ^ Number.GetHashCode(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Data/DateTestEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Integration.Data 5 | { 6 | public class DateTestEntity 7 | { 8 | public virtual int Id { get; set; } 9 | 10 | [Audited] 11 | public virtual DateTime Date { get; set; } 12 | 13 | public override bool Equals(object obj) 14 | { 15 | var other = obj as DateTestEntity; 16 | if (other == null) 17 | return false; 18 | return other.Id == Id && other.Date == Date; 19 | } 20 | 21 | public override int GetHashCode() 22 | { 23 | return Id.GetHashCode() ^ Date.GetHashCode(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Properties/Mapping.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Projection/IAuditProjection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NHibernate.Envers.Configuration; 3 | using NHibernate.Envers.Entities; 4 | 5 | namespace NHibernate.Envers.Query.Projection 6 | { 7 | public interface IAuditProjection 8 | { 9 | /// 10 | /// 11 | /// Configuration. 12 | /// A triple: (function name - possibly null, property name, add distinct?). 13 | Tuple GetData(AuditConfiguration auditCfg); 14 | 15 | object ConvertQueryResult(AuditConfiguration auditCfg, EntityInstantiator entityInstantiator, string entityName, long revision, object value); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/make.year.ranges.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | make.year.ranges 4 | boolean 5 | 6 | 7 | make.year.ranges 8 | Collate copyright years into ranges? 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | If non-zero, copyright years will be collated into ranges. 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/preface.autolabel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | preface.autolabel 4 | boolean 5 | 6 | 7 | preface.autolabel 8 | Are prefaces enumerated? 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | If true (non-zero), unlabeled prefaces will be enumerated. 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/section.autolabel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | section.autolabel 4 | boolean 5 | 6 | 7 | section.autolabel 8 | Are sections enumerated? 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | If true (non-zero), unlabeled sections will be enumerated. 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Entities/Collection/EnumSetEntity.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using NHibernate.Envers.Configuration.Attributes; 3 | 4 | namespace NHibernate.Envers.Tests.Entities.Collection 5 | { 6 | public enum E1 7 | { 8 | X, 9 | Y 10 | } 11 | 12 | public enum E2 13 | { 14 | A, 15 | B 16 | } 17 | 18 | public class EnumSetEntity 19 | { 20 | public EnumSetEntity() 21 | { 22 | Enums1 = new HashSet(); 23 | Enums2 = new HashSet(); 24 | } 25 | 26 | public virtual int Id { get; set; } 27 | [Audited] 28 | public virtual ISet Enums1 { get; set;} 29 | [Audited] 30 | public virtual ISet Enums2 { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Collection/Embeddable/DarkCharacter.hbm.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/Integration/Inheritance/Entities/ParentNotIngEntity.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Configuration.Attributes; 2 | 3 | namespace NHibernate.Envers.Tests.Integration.Inheritance.Entities 4 | { 5 | [Audited] 6 | public class ParentNotIngEntity 7 | { 8 | public virtual int Id { get; set; } 9 | public virtual string Data { get; set; } 10 | 11 | public override bool Equals(object obj) 12 | { 13 | var casted = obj as ParentNotIngEntity; 14 | if (casted == null) 15 | return false; 16 | return (Id == casted.Id && Data == casted.Data); 17 | } 18 | 19 | public override int GetHashCode() 20 | { 21 | return Id ^ Data.GetHashCode(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Src/NHibernate.Envers.Tests/NetSpecific/Integration/ModifiedFlags/Casee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NHibernate.Envers.Configuration.Attributes; 4 | 5 | namespace NHibernate.Envers.Tests.NetSpecific.Integration.ModifiedFlags 6 | { 7 | [Audited] 8 | public class Casee 9 | { 10 | 11 | public virtual int Id { get; set; } 12 | 13 | public virtual DateTime? LastModifyDate { get; set; } 14 | 15 | public virtual ISet CaseTags { get; set; } 16 | 17 | } 18 | 19 | [Audited] 20 | public class CaseToCaseTag 21 | { 22 | 23 | public virtual int Id { get; set; } 24 | 25 | public virtual Casee Right { get; set; } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Src/NHibernate.Envers/Query/Criteria/AuditRelatedId.cs: -------------------------------------------------------------------------------- 1 | using NHibernate.Envers.Query.Property; 2 | 3 | namespace NHibernate.Envers.Query.Criteria 4 | { 5 | public class AuditRelatedId 6 | { 7 | private readonly IPropertyNameGetter _propertyNameGetter; 8 | 9 | public AuditRelatedId(IPropertyNameGetter propertyNameGetter) 10 | { 11 | _propertyNameGetter = propertyNameGetter; 12 | } 13 | 14 | public IAuditCriterion Eq(object id) 15 | { 16 | return new RelatedAuditExpression(_propertyNameGetter, id, true); 17 | } 18 | 19 | public IAuditCriterion Ne(object id) 20 | { 21 | return new RelatedAuditExpression(_propertyNameGetter, id, false); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/base.dir.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | base.dir 4 | 5 | 6 | 7 | base.dir 8 | The base directory of chunks 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | If specified, the base.dir identifies 18 | the output directory for chunks. (If not specified, the output directory 19 | is system dependent.) 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/htmlhelp.hhc.width.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | htmlhelp.hhc.width 4 | integer 5 | 6 | 7 | htmlhelp.hhc.width 8 | Width of navigation (ToC) pane 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | This parameter specifies width of ToC pane in pixels. 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/htmlhelp.hhc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | htmlhelp.hhc 4 | string 5 | 6 | 7 | htmlhelp.hhc 8 | Filename of TOC file. 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Description 18 | 19 | Change this parameter if you want different name of TOC file 20 | than toc.hhc. 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/page.orientation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | page.orientation 4 | 5 | 6 | 7 | page.orientation 8 | Select the page orientation 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | In portrait orientation, the short edge is horizontal; in 18 | landscape orientation, it is vertical. 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Src/doc/Reference/support/docbook-xsl/params/part.autolabel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | part.autolabel 4 | boolean 5 | 6 | 7 | part.autolabel 8 | Are parts and references enumerated? 9 | 10 | 11 | 12 | 13 | 14 | 15 | Description 16 | 17 | If true (non-zero), unlabeled parts and references will be enumerated. 18 | 19 | 20 | 21 | 22 | --------------------------------------------------------------------------------