Example usage for org.hibernate.annotations CascadeType ALL

List of usage examples for org.hibernate.annotations CascadeType ALL

Introduction

In this page you can find the example usage for org.hibernate.annotations CascadeType ALL.

Prototype

CascadeType ALL

To view the source code for org.hibernate.annotations CascadeType ALL.

Click Source Link

Document

Includes all types listed here.

Usage

From source file:com.example.app.profile.model.Profile.java

License:Open Source License

/**
 * Get this Company's Repository/* www . j  av a2 s  .c  o  m*/
 *
 * @return the repository
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = Repository.ID_COLUMN)
@Cascade(CascadeType.ALL)
@NotNull
public Repository getRepository() {
    return _repository;
}

From source file:com.example.app.profile.model.repository.ResourceRepositoryItem.java

License:Open Source License

/**
 * Get the {@link Resource} that this RepositoryItem is pointing to
 *
 * @return the Resource//  w ww.j a v a 2 s  .co  m
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = RESOURCE_COLUMN, unique = true, nullable = false)
@Cascade(CascadeType.ALL)
@Nonnull
public Resource getResource() {
    return _resource;
}

From source file:com.example.app.profile.model.user.User.java

License:Open Source License

/**
 * Get list of {@link UserPosition}s that this user holds or has held
 *
 * @return list of UserPositions/*from   w  w  w .ja v  a  2s.  co m*/
 */
@OneToMany(fetch = FetchType.LAZY, mappedBy = UserPosition.USER_PROP)
@Cascade(CascadeType.ALL)
@BatchSize(size = 10)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = ProjectCacheRegions.ENTITY_DATA)
@NotNull
public List<UserPosition> getUserPositions() {
    return _userPositions;
}

From source file:com.fiveamsolutions.nci.commons.data.security.AbstractUser.java

License:Open Source License

/**
 * @return the passwordResets/*  www  . j av  a 2  s.  c o m*/
 */
@OneToMany(mappedBy = "user")
@Cascade(value = { CascadeType.ALL, CascadeType.DELETE_ORPHAN })
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public Set<PasswordReset> getPasswordResets() {
    return passwordResets;
}

From source file:com.ineunet.knife.security.entity.Role.java

License:Apache License

@ElementCollection(fetch = FetchType.LAZY)
@JoinTable(name = "knife_roles_permissions")
@Cascade(value = CascadeType.ALL)
@JsonIgnore//from  w  w  w.  j a v a2s.com
public Set<String> getPermissions() {
    return permissions;
}

From source file:com.ineunet.knife.security.entity.Tenant.java

License:Apache License

@JsonIgnore
@ManyToMany(fetch = FetchType.LAZY)/*from w  w  w . ja  v a2  s .c o  m*/
@JoinTable(name = "knife_tenants_roles")
@Cascade(value = CascadeType.ALL)
public Set<Role> getRoles() {
    return roles;
}

From source file:com.omsu.cherepanov.Clients.Construction.java

@OneToMany()
@Cascade(CascadeType.ALL)
@JoinTable(name = "construction_people", joinColumns = @JoinColumn(name = "Construction_Mainclient_ObjectID"), inverseJoinColumns = @JoinColumn(name = "People_Mainclient_ObjectID"))
public List<People> getStaff() {
    return staff;
}

From source file:com.omsu.cherepanov.Graph.DirectedGraph.java

@OneToMany(fetch = FetchType.EAGER, targetEntity = VertexConnection.class)
@Cascade(CascadeType.ALL)
public List<VertexConnection> getConnectionOfVertex() {
    return connectionOfVertex;
}

From source file:com.omsu.cherepanov.Graph.ElementOfGraph.java

@OneToOne(fetch = FetchType.EAGER)
@Cascade(CascadeType.ALL)
@JoinColumn(name = "Connection_ObjectID")
@MapsId("connectionID")
public Connection getEdge() {
    return edge;/*from   w ww.j a  v a2s .  co m*/
}

From source file:com.userweave.domain.ModuleConfigurationWithGroups.java

License:Open Source License

@Override
@OneToMany
@Cascade(value = { CascadeType.ALL })
public List<G> getGroups() {
    return groups;
}