Java 类org.hibernate.annotations.CascadeType 实例源码

项目:eMonocot    文件:MeasurementOrFact.java   
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'MeasurementOrFact'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:scheduling    文件:TaskData.java   
@Cascade(CascadeType.ALL)
@OneToMany(mappedBy = "taskData")
@OnDelete(action = OnDeleteAction.CASCADE)
public List<EnvironmentModifierData> getEnvModifiers() {
    return envModifiers;
}
项目:powop    文件:Identification.java   
@Override
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Identification'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:powop    文件:Distribution.java   
/**
 * @return the annotations
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Distribution'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:lams    文件:AnnotationBinder.java   
private static EnumSet<CascadeType> convertToHibernateCascadeType(javax.persistence.CascadeType[] ejbCascades) {
    EnumSet<CascadeType> hibernateCascadeSet = EnumSet.noneOf( CascadeType.class );
    if ( ejbCascades != null && ejbCascades.length > 0 ) {
        for ( javax.persistence.CascadeType cascade : ejbCascades ) {
            switch ( cascade ) {
                case ALL:
                    hibernateCascadeSet.add( CascadeType.ALL );
                    break;
                case PERSIST:
                    hibernateCascadeSet.add( CascadeType.PERSIST );
                    break;
                case MERGE:
                    hibernateCascadeSet.add( CascadeType.MERGE );
                    break;
                case REMOVE:
                    hibernateCascadeSet.add( CascadeType.REMOVE );
                    break;
                case REFRESH:
                    hibernateCascadeSet.add( CascadeType.REFRESH );
                    break;
                case DETACH:
                    hibernateCascadeSet.add( CascadeType.DETACH );
                    break;
            }
        }
    }

    return hibernateCascadeSet;
}
项目:finances    文件:MockDaoContext.java   
private void cascadeSave(UniqueId<Long> entity) throws Exception {
    for (Field field : entity.getClass().getDeclaredFields()) {
        if (isLongUniqueId(field.getType()) && isCascade(field, CascadeType.SAVE_UPDATE)) {
            field.setAccessible(true);
            @SuppressWarnings("unchecked")
            UniqueId<Long> fieldValue = (UniqueId<Long>) field.get(entity);
            if (fieldValue != null) {
                assignId(fieldValue);
            }
        }
    }
}
项目:helium    文件:SequenciaDefaultAny.java   
@SuppressWarnings("deprecation")
@ManyToOne(optional=true)
@JoinColumn(name="expedient_tipus")
@ForeignKey(name="hel_exptipus_seqdefany_fk")
@Cascade({CascadeType.DELETE_ORPHAN})
public ExpedientTipus getExpedientTipus() {
    return expedientTipus;
}
项目:eMonocot    文件:Description.java   
/**
 * @return the annotations
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Description'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:civilizer    文件:Fragment.java   
@OneToMany(fetch=FetchType.LAZY)
@Cascade({
    CascadeType.PERSIST
  , CascadeType.MERGE
  , CascadeType.REFRESH
  , CascadeType.SAVE_UPDATE
  , CascadeType.DETACH
})
@JoinTable(name = "FRAGMENT2FRAGMENT",
    joinColumns = @JoinColumn(name = "from_id"),
    inverseJoinColumns = @JoinColumn(name = "to_id"))
public Set<Fragment> getRelatedOnes() {
    return relatedOnes;
}
项目:eMonocot    文件:TypeAndSpecimen.java   
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "Taxon_TypeAndSpecimen", joinColumns = {@JoinColumn(name = "typesAndSpecimens_id")}, inverseJoinColumns = {@JoinColumn(name = "Taxon_id")})
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
@JsonSerialize(contentUsing = TaxonSerializer.class)
public Set<Taxon> getTaxa() {
    return taxa;
}
项目:eMonocot    文件:TypeAndSpecimen.java   
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'TypeAndSpecimen'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:eMonocot    文件:IdentificationKey.java   
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "Taxon_IdentificationKey", joinColumns = {@JoinColumn(name = "keys_id")}, inverseJoinColumns = {@JoinColumn(name = "Taxon_id")})
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
@JsonSerialize(contentUsing = TaxonSerializer.class)
public Set<Taxon> getTaxa() {
    return taxa;
}
项目:eMonocot    文件:IdentificationKey.java   
/**
 * @return the comments
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'IdentificationKey'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:eMonocot    文件:Place.java   
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Place'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:eMonocot    文件:Reference.java   
/**
 * The list of all taxa associated with this reference.
 *
 * @return a set of taxa
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "Taxon_Reference", joinColumns = {@JoinColumn(name = "references_id")}, inverseJoinColumns = {@JoinColumn(name = "Taxon_id")})
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
@JsonSerialize(contentUsing = TaxonSerializer.class)
public Set<Taxon> getTaxa() {
    return taxa;
}
项目:eMonocot    文件:Reference.java   
/**
 * @return the annotations
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Reference'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:eMonocot    文件:Identifier.java   
/**
 * @return the annotations
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Identifier'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:eMonocot    文件:Concept.java   
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "Taxon_Concept", joinColumns = {@JoinColumn(name = "concepts_id")}, inverseJoinColumns = {@JoinColumn(name = "Taxon_id")})
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
@JsonSerialize(contentUsing = TaxonSerializer.class)
public Set<Taxon> getTaxa() {
    return taxa;
}
项目:eMonocot    文件:Concept.java   
/**
 * @return the comments
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'Concept'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:civilizer    文件:Fragment.java   
@OneToMany(fetch=FetchType.LAZY)
@Cascade({
    CascadeType.PERSIST
  , CascadeType.MERGE
  , CascadeType.REFRESH
  , CascadeType.SAVE_UPDATE
  , CascadeType.DETACH
})
@JoinTable(name = "TAG2FRAGMENT",
    joinColumns = @JoinColumn(name = "fragment_id"),
    inverseJoinColumns = @JoinColumn(name = "tag_id"))
public Set<Tag> getTags() {
    return this.tags;
}
项目:eMonocot    文件:Distribution.java   
/**
 * @return the references
 */
@ManyToMany(fetch = FetchType.LAZY)
@Cascade({ CascadeType.SAVE_UPDATE })
@JoinTable(name = "Distribution_Reference", joinColumns = { @JoinColumn(name = "Distribution_id") }, inverseJoinColumns = { @JoinColumn(name = "references_id") })
@JsonSerialize(contentUsing = ReferenceSerializer.class)
public Set<Reference> getReferences() {
    return references;
}
项目:eMonocot    文件:PhylogeneticTree.java   
@Override
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'PhylogeneticTree'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:eMonocot    文件:PhylogeneticTree.java   
@Override
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "Taxon_PhylogeneticTree", joinColumns = {@JoinColumn(name = "trees_id")}, inverseJoinColumns = {@JoinColumn(name = "Taxon_id")})
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
@JsonSerialize(contentUsing = TaxonSerializer.class)
public Set<Taxon> getTaxa() {
    return taxa;
}
项目:eMonocot    文件:PhylogeneticTree.java   
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "PhylogeneticTree_Taxon", joinColumns = {@JoinColumn(name = "PhylogeneticTree_id")}, inverseJoinColumns = {@JoinColumn(name = "leaves_id")})
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
@JsonSerialize(contentUsing = TaxonSerializer.class)
public Set<Taxon> getLeaves() {
    return leaves;
}
项目:eMonocot    文件:PhylogeneticTree.java   
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'PhylogeneticTree'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:eMonocot    文件:User.java   
/**
 *
 * @return the groups this user is a member of
 */
@ManyToMany(fetch = FetchType.LAZY)
@Cascade({CascadeType.SAVE_UPDATE})
@JoinTable(
     name = "User_Group",
     joinColumns = { @JoinColumn(name = "User_id") },
     inverseJoinColumns = { @JoinColumn(name = "groups_id") })
@JsonSerialize(contentUsing = GroupSerializer.class)
public Set<Group> getGroups() {
 return groups;
}
项目:eMonocot    文件:Image.java   
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "Taxon_Image", joinColumns = {@JoinColumn(name = "images_id")}, inverseJoinColumns = {@JoinColumn(name = "Taxon_id")})
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE })
@JsonSerialize(contentUsing = TaxonSerializer.class)
public Set<Taxon> getTaxa() {
    return taxa;
}
项目:eMonocot    文件:Image.java   
@Override
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Image'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:eMonocot    文件:Image.java   
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'Image'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:eMonocot    文件:VernacularName.java   
@Override
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'VernacularName'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:eMonocot    文件:Organisation.java   
/**
 * @return the jobs
 */
@JsonIgnore
@OneToMany(fetch = FetchType.LAZY, mappedBy = "organisation")
@Cascade(CascadeType.DELETE)
@OrderBy("lastHarvested DESC")
public Set<Resource> getResources() {
 return resources;
}
项目:eMonocot    文件:Organisation.java   
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Organisation'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
 return annotations;
}
项目:eMonocot    文件:Taxon.java   
/**
 * @return a map of descriptions about the taxon
 */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "taxon", orphanRemoval = true)
@Cascade({ CascadeType.ALL })
@JsonManagedReference("descriptions-taxon")
public Set<Description> getDescriptions() {
    return descriptions;
}
项目:eMonocot    文件:Taxon.java   
/**
 * @return the immediate taxonomic parent
 */
@ManyToOne(fetch = FetchType.LAZY)
@Cascade({ CascadeType.SAVE_UPDATE })
@JsonSerialize(using = TaxonSerializer.class)
public Taxon getParentNameUsage() {
    return parentNameUsage;
}
项目:eMonocot    文件:Taxon.java   
/**
 * @return get the accepted name of this synonym
 */
@ManyToOne(fetch = FetchType.LAZY)
@Cascade({ CascadeType.SAVE_UPDATE })
@JsonSerialize(using = TaxonSerializer.class)
public Taxon getAcceptedNameUsage() {
    return acceptedNameUsage;
}
项目:eMonocot    文件:Taxon.java   
/**
 * @return the distribution associated with this taxon
 */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "taxon", orphanRemoval = true)
@Cascade({ CascadeType.ALL })
@JsonManagedReference("distribution-taxon")
public Set<Distribution> getDistribution() {
    return distribution;
}
项目:eMonocot    文件:Taxon.java   
/**
 * @return the annotations
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Taxon'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}
项目:eMonocot    文件:Taxon.java   
/**
 * @return the protologue
 */
@ManyToOne(fetch = FetchType.LAZY)
@Cascade({ CascadeType.SAVE_UPDATE })
@JsonSerialize(using = ReferenceSerializer.class)
public Reference getNamePublishedIn() {
    return namePublishedIn;
}
项目:civilizer    文件:Tag.java   
@OneToMany(fetch=FetchType.LAZY)
@Cascade({CascadeType.MERGE
    , CascadeType.REFRESH
    , CascadeType.SAVE_UPDATE
    , CascadeType.DETACH
})
@JoinTable(name = "TAG2FRAGMENT",
    joinColumns = @JoinColumn(name = "tag_id"),
    inverseJoinColumns = @JoinColumn(name = "fragment_id"))
public Set<Fragment> getFragments() {
    return this.fragments;
}
项目:eMonocot    文件:Taxon.java   
/**
 * @return the originalNameUsage
 */
@ManyToOne(fetch = FetchType.LAZY)
@Cascade({ CascadeType.SAVE_UPDATE })
@JsonSerialize(using = TaxonSerializer.class)
public Taxon getOriginalNameUsage() {
    return originalNameUsage;
}