From e6338ceb80f42e10464aeeb632e6b169904a2e3e Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 2 Jan 2019 14:32:45 +0100 Subject: [PATCH] #156 - Update copyright years to 2019. --- src/main/asciidoc/index.adoc | 2 +- .../DefaultRevisionEntityInformation.java | 2 +- .../support/DefaultRevisionMetadata.java | 156 +++++++++--------- .../support/EnversRevisionRepository.java | 2 +- .../EnversRevisionRepositoryFactoryBean.java | 2 +- .../support/EnversRevisionRepositoryImpl.java | 2 +- .../ReflectionRevisionEntityInformation.java | 2 +- .../springframework/data/envers/Config.java | 152 ++++++++--------- .../DefaultRevisionMetadataUnitTests.java | 2 +- ...EnversRevisionRepositoryImplUnitTests.java | 4 +- .../QueryDslRepositoryIntegrationTests.java | 2 +- .../support/RepositoryIntegrationTests.java | 2 +- .../data/envers/sample/AbstractEntity.java | 2 +- .../data/envers/sample/Country.java | 72 ++++---- .../sample/CountryQueryDslRepository.java | 2 +- .../data/envers/sample/CountryRepository.java | 2 +- .../data/envers/sample/License.java | 82 ++++----- .../data/envers/sample/LicenseRepository.java | 2 +- .../data/envers/sample/QCountry.java | 4 +- 19 files changed, 248 insertions(+), 248 deletions(-) diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index 066ec9b..a624a7d 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -4,7 +4,7 @@ Oliver Gierke; :revdate: {localdate} :spring-data-commons-docs: ../../../../spring-data-commons/src/main/asciidoc -(C) 2008-2018 The original authors. +(C) 2008-2019 The original authors. NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. diff --git a/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java b/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java index 6bd9ef5..30b0cda 100644 --- a/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java +++ b/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java b/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java index 3557311..40ea4ad 100755 --- a/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java +++ b/src/main/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadata.java @@ -1,78 +1,78 @@ -/* - * Copyright 2012-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.envers.repository.support; - -import lombok.AccessLevel; -import lombok.Getter; -import lombok.NonNull; -import lombok.Value; - -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.ZoneOffset; -import java.util.Optional; - -import org.hibernate.envers.DefaultRevisionEntity; -import org.springframework.data.history.RevisionMetadata; - -/** - * {@link RevisionMetadata} working with a {@link DefaultRevisionEntity}. - * - * @author Oliver Gierke - * @author Philip Huegelmeyer - * @author Jens Schauder - */ -@Value -public class DefaultRevisionMetadata implements RevisionMetadata { - - private final @NonNull @Getter(AccessLevel.NONE) DefaultRevisionEntity entity; - - /* - * (non-Javadoc) - * @see org.springframework.data.history.RevisionMetadata#getRevisionNumber() - */ - public Optional getRevisionNumber() { - return Optional.ofNullable(entity.getId()); - } - - /* - * (non-Javadoc) - * @see org.springframework.data.history.RevisionMetadata#getRevisionDate() - */ - @Deprecated - public Optional getRevisionDate() { - return getRevisionInstant().map(instant -> LocalDateTime.ofInstant(instant, ZoneOffset.systemDefault())); - } - - - /* - * (non-Javadoc) - * @see org.springframework.data.history.RevisionMetadata#getRevisionInstant() - */ - @Override - public Optional getRevisionInstant() { - return Optional.of(Instant.ofEpochMilli(entity.getTimestamp())); - } - - /* - * (non-Javadoc) - * @see org.springframework.data.history.RevisionMetadata#getDelegate() - */ - @SuppressWarnings("unchecked") - public T getDelegate() { - return (T) entity; - } -} +/* + * Copyright 2012-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.envers.repository.support; + +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NonNull; +import lombok.Value; + +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.ZoneOffset; +import java.util.Optional; + +import org.hibernate.envers.DefaultRevisionEntity; +import org.springframework.data.history.RevisionMetadata; + +/** + * {@link RevisionMetadata} working with a {@link DefaultRevisionEntity}. + * + * @author Oliver Gierke + * @author Philip Huegelmeyer + * @author Jens Schauder + */ +@Value +public class DefaultRevisionMetadata implements RevisionMetadata { + + private final @NonNull @Getter(AccessLevel.NONE) DefaultRevisionEntity entity; + + /* + * (non-Javadoc) + * @see org.springframework.data.history.RevisionMetadata#getRevisionNumber() + */ + public Optional getRevisionNumber() { + return Optional.ofNullable(entity.getId()); + } + + /* + * (non-Javadoc) + * @see org.springframework.data.history.RevisionMetadata#getRevisionDate() + */ + @Deprecated + public Optional getRevisionDate() { + return getRevisionInstant().map(instant -> LocalDateTime.ofInstant(instant, ZoneOffset.systemDefault())); + } + + + /* + * (non-Javadoc) + * @see org.springframework.data.history.RevisionMetadata#getRevisionInstant() + */ + @Override + public Optional getRevisionInstant() { + return Optional.of(Instant.ofEpochMilli(entity.getTimestamp())); + } + + /* + * (non-Javadoc) + * @see org.springframework.data.history.RevisionMetadata#getDelegate() + */ + @SuppressWarnings("unchecked") + public T getDelegate() { + return (T) entity; + } +} diff --git a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java index 8cde690..b9016d0 100644 --- a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java +++ b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java index a8d4a3f..8a4157c 100755 --- a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java +++ b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java index a404585..eed2733 100755 --- a/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java +++ b/src/main/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java b/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java index f136ac2..7d41c23 100644 --- a/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java +++ b/src/main/java/org/springframework/data/envers/repository/support/ReflectionRevisionEntityInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/envers/Config.java b/src/test/java/org/springframework/data/envers/Config.java index b0fabf5..eaf3279 100755 --- a/src/test/java/org/springframework/data/envers/Config.java +++ b/src/test/java/org/springframework/data/envers/Config.java @@ -1,76 +1,76 @@ -/* - * Copyright 2012-2014 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.envers; - -import java.sql.SQLException; -import java.util.Collections; -import java.util.Map; - -import javax.sql.DataSource; - -import org.hibernate.envers.strategy.ValidityAuditStrategy; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.envers.repository.support.EnversRevisionRepositoryFactoryBean; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; -import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; -import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; -import org.springframework.orm.jpa.JpaTransactionManager; -import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; -import org.springframework.orm.jpa.vendor.Database; -import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; -import org.springframework.transaction.PlatformTransactionManager; - -/** - * Spring JavaConfig configuration for general infrastructure. - * - * @author Oliver Gierke - */ -@Configuration -@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class) -public class Config { - - @Bean - public DataSource dataSource() throws SQLException { - return new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.H2).build(); - } - - @Bean - public PlatformTransactionManager transactionManager() throws SQLException { - return new JpaTransactionManager(); - } - - @Bean - public AbstractEntityManagerFactoryBean entityManagerFactory() throws SQLException { - - HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter(); - jpaVendorAdapter.setDatabase(Database.H2); - jpaVendorAdapter.setGenerateDdl(true); - - LocalContainerEntityManagerFactoryBean bean = new LocalContainerEntityManagerFactoryBean(); - bean.setJpaVendorAdapter(jpaVendorAdapter); - bean.setPackagesToScan(Config.class.getPackage().getName()); - bean.setDataSource(dataSource()); - bean.setJpaPropertyMap(jpaProperties()); - - return bean; - } - - private Map jpaProperties() { - return Collections.singletonMap("org.hibernate.envers.audit_strategy", ValidityAuditStrategy.class.getName()); - } -} +/* + * Copyright 2012-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.envers; + +import java.sql.SQLException; +import java.util.Collections; +import java.util.Map; + +import javax.sql.DataSource; + +import org.hibernate.envers.strategy.ValidityAuditStrategy; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.envers.repository.support.EnversRevisionRepositoryFactoryBean; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; +import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; +import org.springframework.orm.jpa.JpaTransactionManager; +import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; +import org.springframework.orm.jpa.vendor.Database; +import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; +import org.springframework.transaction.PlatformTransactionManager; + +/** + * Spring JavaConfig configuration for general infrastructure. + * + * @author Oliver Gierke + */ +@Configuration +@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class) +public class Config { + + @Bean + public DataSource dataSource() throws SQLException { + return new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.H2).build(); + } + + @Bean + public PlatformTransactionManager transactionManager() throws SQLException { + return new JpaTransactionManager(); + } + + @Bean + public AbstractEntityManagerFactoryBean entityManagerFactory() throws SQLException { + + HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter(); + jpaVendorAdapter.setDatabase(Database.H2); + jpaVendorAdapter.setGenerateDdl(true); + + LocalContainerEntityManagerFactoryBean bean = new LocalContainerEntityManagerFactoryBean(); + bean.setJpaVendorAdapter(jpaVendorAdapter); + bean.setPackagesToScan(Config.class.getPackage().getName()); + bean.setDataSource(dataSource()); + bean.setJpaPropertyMap(jpaProperties()); + + return bean; + } + + private Map jpaProperties() { + return Collections.singletonMap("org.hibernate.envers.audit_strategy", ValidityAuditStrategy.class.getName()); + } +} diff --git a/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java b/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java index 72a261c..8cb1624 100644 --- a/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java +++ b/src/test/java/org/springframework/data/envers/repository/support/DefaultRevisionMetadataUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java b/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java index 9bb1713..21cb79b 100644 --- a/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java +++ b/src/test/java/org/springframework/data/envers/repository/support/EnversRevisionRepositoryImplUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,4 +98,4 @@ public class EnversRevisionRepositoryImplUnitTests { private static class DummyEntity { } -} \ No newline at end of file +} diff --git a/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java index b7be289..11e42d7 100755 --- a/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/envers/repository/support/QueryDslRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java b/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java index ee49ef6..809082c 100755 --- a/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/envers/repository/support/RepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java b/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java index c4c2dbf..f95065f 100644 --- a/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java +++ b/src/test/java/org/springframework/data/envers/sample/AbstractEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/envers/sample/Country.java b/src/test/java/org/springframework/data/envers/sample/Country.java index 42feee5..6f7e131 100755 --- a/src/test/java/org/springframework/data/envers/sample/Country.java +++ b/src/test/java/org/springframework/data/envers/sample/Country.java @@ -1,36 +1,36 @@ -/* - * Copyright 2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.envers.sample; - -import javax.persistence.Entity; - -import lombok.ToString; -import org.hibernate.envers.Audited; - -/** - * Sample domain class. - * - * @author Oliver Gierke - * @author Jens Schauder - */ -@Audited -@Entity -@ToString -public class Country extends AbstractEntity { - - public String code; - public String name; -} +/* + * Copyright 2012-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.envers.sample; + +import javax.persistence.Entity; + +import lombok.ToString; +import org.hibernate.envers.Audited; + +/** + * Sample domain class. + * + * @author Oliver Gierke + * @author Jens Schauder + */ +@Audited +@Entity +@ToString +public class Country extends AbstractEntity { + + public String code; + public String name; +} diff --git a/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java b/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java index 5267c16..d49f23b 100755 --- a/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java +++ b/src/test/java/org/springframework/data/envers/sample/CountryQueryDslRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/envers/sample/CountryRepository.java b/src/test/java/org/springframework/data/envers/sample/CountryRepository.java index 0429536..d8541c0 100755 --- a/src/test/java/org/springframework/data/envers/sample/CountryRepository.java +++ b/src/test/java/org/springframework/data/envers/sample/CountryRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/envers/sample/License.java b/src/test/java/org/springframework/data/envers/sample/License.java index e727577..08c97ec 100755 --- a/src/test/java/org/springframework/data/envers/sample/License.java +++ b/src/test/java/org/springframework/data/envers/sample/License.java @@ -1,41 +1,41 @@ -/* - * Copyright 2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.envers.sample; - -import java.util.Set; - -import javax.persistence.Entity; -import javax.persistence.ManyToMany; -import javax.persistence.Version; - -import org.hibernate.envers.Audited; - -/** - * Sample domain class. - * - * @author Philip Huegelmeyer - */ -@Audited -@Entity -public class License extends AbstractEntity { - - @Version - public Integer version; - - public String name; - @ManyToMany - public Set laender; -} +/* + * Copyright 2012-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.data.envers.sample; + +import java.util.Set; + +import javax.persistence.Entity; +import javax.persistence.ManyToMany; +import javax.persistence.Version; + +import org.hibernate.envers.Audited; + +/** + * Sample domain class. + * + * @author Philip Huegelmeyer + */ +@Audited +@Entity +public class License extends AbstractEntity { + + @Version + public Integer version; + + public String name; + @ManyToMany + public Set laender; +} diff --git a/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java b/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java index 5d72e7b..df586b0 100755 --- a/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java +++ b/src/test/java/org/springframework/data/envers/sample/LicenseRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/java/org/springframework/data/envers/sample/QCountry.java b/src/test/java/org/springframework/data/envers/sample/QCountry.java index df59661..9fa1157 100755 --- a/src/test/java/org/springframework/data/envers/sample/QCountry.java +++ b/src/test/java/org/springframework/data/envers/sample/QCountry.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,4 +60,4 @@ public class QCountry extends EntityPathBase { super(type, metadata, inits); } -} \ No newline at end of file +}