org.hibernate.annotations.Cache Java Examples
The following examples show how to use
org.hibernate.annotations.Cache.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CollectionBinder.java From lams with GNU General Public License v2.0 | 5 votes |
public void setCache(Cache cacheAnn) { if ( cacheAnn != null ) { cacheRegionName = BinderHelper.isEmptyAnnotationValue( cacheAnn.region() ) ? null : cacheAnn.region(); cacheConcurrencyStrategy = EntityBinder.getCacheConcurrencyStrategy( cacheAnn.usage() ); } else { cacheConcurrencyStrategy = null; cacheRegionName = null; } }
Example #2
Source File: Trainer.java From quarkus with Apache License 2.0 | 4 votes |
@OneToMany @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public List<Pokemon> getPokemons() { return pokemons; }
Example #3
Source File: EntityBinder.java From lams with GNU General Public License v2.0 | 4 votes |
private static Cache buildCacheMock(String region, MetadataBuildingContext context) { return new LocalCacheAnnotationStub( region, determineCacheConcurrencyStrategy( context ) ); }
Example #4
Source File: EntityBinder.java From lams with GNU General Public License v2.0 | 4 votes |
public Class<? extends Annotation> annotationType() { return Cache.class; }
Example #5
Source File: RolePermission.java From Spring-MVC-Blueprints with MIT License | 4 votes |
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "userId", nullable = false) public Login getLogin() { return this.login; }
Example #6
Source File: RolePermission.java From Spring-MVC-Blueprints with MIT License | 4 votes |
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "roleId", nullable = false) public Role getRole() { return this.role; }
Example #7
Source File: Login.java From Spring-MVC-Blueprints with MIT License | 4 votes |
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE) @OneToOne(fetch = FetchType.LAZY) @PrimaryKeyJoinColumn public CustomerAccount getCustomerAccount() { return this.customerAccount; }
Example #8
Source File: User.java From java-course-ee with MIT License | 4 votes |
@ManyToMany @JoinTable(name = "users_roles") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public Set<Role> getRoles() { return roles; }
Example #9
Source File: Role.java From java-course-ee with MIT License | 4 votes |
@CollectionOfElements @JoinTable(name = "roles_permissions") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public Set<String> getPermissions() { return permissions; }