List of usage examples for javax.persistence CascadeType REMOVE
CascadeType REMOVE
To view the source code for javax.persistence CascadeType REMOVE.
Click Source Link
From source file:com.impetus.ankush.common.domain.Cluster.java
/** * @return the haServices/* www. j ava 2 s .c om*/ */ @OneToMany(mappedBy = CLUSTER_ID, fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) @JsonIgnore public List<HAService> getHaServices() { return haServices; }
From source file:com.jeefuse.system.security.model.GsysRole.java
/** * ------------------------------------------------------------------------ * gsysRelRoleFunctions/*from w w w. j av a 2 s. com*/ * ------------------------------------------------------------------------ * @generated */ @OneToMany(fetch = FetchType.LAZY, mappedBy = "gsysRole", cascade = CascadeType.REMOVE) public List<GsysRelRoleFunction> getGsysRelRoleFunctions() { if (this.gsysRelRoleFunctions == null) { this.gsysRelRoleFunctions = new ArrayList<GsysRelRoleFunction>(); } return gsysRelRoleFunctions; }
From source file:com.impetus.kundera.lifecycle.states.NodeState.java
/** * @param nodeStateContext//from w ww. ja va 2s . c om */ protected void recursivelyPerformOperation(NodeStateContext nodeStateContext, OPERATION operation) { Map<NodeLink, Node> children = nodeStateContext.getChildren(); if (children != null) { for (NodeLink nodeLink : children.keySet()) { List<CascadeType> cascadeTypes = (List<CascadeType>) nodeLink.getLinkProperty(LinkProperty.CASCADE); switch (operation) { case PERSIST: if (cascadeTypes.contains(CascadeType.PERSIST) || cascadeTypes.contains(CascadeType.ALL)) { Node childNode = children.get(nodeLink); childNode.persist(); } break; case MERGE: if (cascadeTypes.contains(CascadeType.MERGE) || cascadeTypes.contains(CascadeType.ALL)) { Node childNode = children.get(nodeLink); childNode.merge(); } break; case REMOVE: if (cascadeTypes.contains(CascadeType.REMOVE) || cascadeTypes.contains(CascadeType.ALL)) { Node childNode = children.get(nodeLink); childNode.remove(); } break; case REFRESH: if (cascadeTypes.contains(CascadeType.REFRESH) || cascadeTypes.contains(CascadeType.ALL)) { Node childNode = children.get(nodeLink); childNode.refresh(); } break; case DETACH: if (cascadeTypes.contains(CascadeType.DETACH) || cascadeTypes.contains(CascadeType.ALL)) { Node childNode = children.get(nodeLink); childNode.detach(); } break; } } } }
From source file:org.meruvian.yama.repository.jpa.user.JpaUser.java
@JsonIgnore @OneToMany(mappedBy = "user", cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY) public List<JpaUserRole> getRoles() { return roles; }
From source file:com.infinities.skyport.entity.Organization.java
@OneToMany(fetch = FetchType.LAZY, mappedBy = "parent", cascade = CascadeType.REMOVE) public Set<Organization> getOrganizations() { return organizations; }
From source file:com.jeefuse.system.code.model.GsysCode.java
/** * ------------------------------------------------------------------------ * gsysCodevalues/*ww w . j a v a 2 s .c o m*/ * ------------------------------------------------------------------------ * @generated */ @OneToMany(fetch = FetchType.LAZY, mappedBy = "gsysCode", cascade = CascadeType.REMOVE) public List<GsysCodevalue> getGsysCodevalues() { if (this.gsysCodevalues == null) { this.gsysCodevalues = new ArrayList<GsysCodevalue>(); } return gsysCodevalues; }
From source file:net.shopxx.entity.ShippingMethod.java
@OneToMany(mappedBy = "shippingMethod", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) public Set<FreightConfig> getFreightConfigs() { return freightConfigs; }
From source file:com.impetus.ankush.common.domain.Node.java
/** * @return the configuration/*from w w w. ja v a 2 s .c o m*/ */ @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) @JoinColumns({ @JoinColumn(name = "clusterId", referencedColumnName = "clusterId"), @JoinColumn(name = "host", referencedColumnName = "publicIp") }) public List<Configuration> getConfiguration() { return configuration; }
From source file:com.impetus.ankush.common.domain.Cluster.java
/** * @return the operations//from w w w . j a v a 2 s . c om */ @OneToMany(mappedBy = CLUSTER_ID, fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) @JsonIgnore public List<Operation> getOperations() { return operations; }
From source file:com.impetus.ankush.common.domain.Node.java
/** * Gets the monitors.//ww w. j a v a 2 s.c o m * * @return the monitors */ @OneToMany(mappedBy = "nodeId", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE) @JsonIgnore public List<NodeMonitoring> getMonitors() { return monitors; }