Codota Logo
Association.setOwningSide
Code IndexAdd Codota to your IDE (free)

How to use
setOwningSide
method
in
org.grails.datastore.mapping.model.types.Association

Best Java code snippets using org.grails.datastore.mapping.model.types.Association.setOwningSide (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: org.grails/grails-datastore-core

protected void configureOwningSide(Association association) {
  PersistentEntity associatedEntity = association.getAssociatedEntity();
  if(associatedEntity == null) {
    association.setOwningSide(true);
  }
  else {
    if (association.isBidirectional()) {
      if (associatedEntity.isOwningEntity(association.getOwner())) {
        association.setOwningSide(true);
      }
    }
    else {
      if (association instanceof OneToOne) {
        if (associatedEntity.isOwningEntity(association.getOwner()))
          association.setOwningSide(true);
      } else if (!(association instanceof Basic)) {
        if (associatedEntity.isOwningEntity(association.getOwner())) {
          association.setOwningSide(true);
        }
        else {
          association.setOwningSide(false);
        }
      }
    }
  }
}
org.grails.datastore.mapping.model.typesAssociationsetOwningSide

Javadoc

Sets whether this association is the owning side

Popular methods of Association

  • getAssociatedEntity
  • getName
  • getInverseSide
  • getOwner
  • getType
  • isBidirectional
  • isEmbedded
  • isOwningSide
    Returns whether this side owns the relationship. This controls the default cascading behavior if non
  • buildCascadeOperations
  • doesCascade
    Returns true if the this association cascade for the given cascade operation
  • getCascadeOperations
  • getFetchStrategy
  • getCascadeOperations,
  • getFetchStrategy,
  • getMapping,
  • getReferencedPropertyName,
  • isCircular,
  • setAssociatedEntity,
  • setReferencedPropertyName

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • putExtra (Intent)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JFileChooser (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now