Tabnine Logo
ClassDescriptor.visitProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
visitProperties
method
in
org.apache.cayenne.reflect.ClassDescriptor

Best Java code snippets using org.apache.cayenne.reflect.ClassDescriptor.visitProperties (Showing top 16 results out of 315)

origin: org.apache.cayenne/cayenne-server

public boolean visitProperties(PropertyVisitor visitor) {
  checkDescriptorInitialized();
  return descriptor.visitProperties(visitor);
}
origin: org.apache.cayenne/cayenne-server

/**
 * Adds superclass properties to the descriptor, applying proper overrides.
 */
protected void indexSuperclassProperties(final PersistentDescriptor descriptor) {
  ClassDescriptor superDescriptor = descriptor.getSuperclassDescriptor();
  if (superDescriptor != null) {
    superDescriptor.visitProperties(new PropertyVisitor() {
      public boolean visitAttribute(AttributeProperty property) {
        // decorate super property to return an overridden attribute
        descriptor.addSuperProperty(new AttributePropertyDecorator(descriptor, property));
        return true;
      }
      public boolean visitToMany(ToManyProperty property) {
        descriptor.addSuperProperty(property);
        return true;
      }
      public boolean visitToOne(ToOneProperty property) {
        descriptor.addSuperProperty(property);
        return true;
      }
    });
  }
}
origin: org.apache.cayenne/cayenne-server

private void applySimplePropertyChanges(final GraphChangeHandler handler) {
  getClassDescriptor().visitProperties(new PropertyVisitor() {
    @Override
    public boolean visitAttribute(AttributeProperty property) {
      Object newValue = property.readProperty(object);
      // no baseline to compare
      if (snapshot == null) {
        if (newValue != null) {
          handler.nodePropertyChanged(nodeId, property.getName(), null, newValue);
        }
      }
      // have baseline to compare
      else {
        Object oldValue = snapshot.get(property.getName());
        if (!Util.nullSafeEquals(oldValue, newValue)) {
          handler.nodePropertyChanged(nodeId, property.getName(), oldValue, newValue);
        }
      }
      return true;
    }
    @Override
    public boolean visitToMany(ToManyProperty property) {
      return true;
    }
    @Override
    public boolean visitToOne(ToOneProperty property) {
      return true;
    }
  });
}
origin: org.apache.cayenne/cayenne-server

descriptor.visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

getClassDescriptor().visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

descriptor.visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

    .get(object.getObjectId());
descriptor.visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

classDescriptor.visitProperties(new PropertyVisitor() {
  @Override
  public boolean visitAttribute(final AttributeProperty property) {
origin: org.apache.cayenne/cayenne-commitlog

final CommitLogEntity entity = entityFactory.getEntity(id);
descriptor.visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

descriptor.visitProperties(arcInvalidator);
object.setPersistenceState(PersistenceState.HOLLOW);
origin: org.apache.cayenne/cayenne-server

seen.put(id, target);
descriptor.visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

    .getEntityResolver()
    .getClassDescriptor(oid.getEntityName());
descriptor.visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

descriptor.visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

this.arcSnapshot = new HashMap<>();
classDescriptor.visitProperties(new PropertyVisitor() {
origin: com.nhl.link.move/link-move

descriptor.visitProperties(new PropertyVisitor() {
origin: org.apache.cayenne/cayenne-server

snapshot.setEntityName(entity.getName());
descriptor.visitProperties(new PropertyVisitor() {
org.apache.cayenne.reflectClassDescriptorvisitProperties

Javadoc

Passes the visitor to the properties "visit" method for all properties declared in this descriptor and all its super-decsriptors. Properties that are overridden in subdescriptors will include overridden information. Walkthrough is terminated in case one of the properties returns false. Returns true if all visited properties returned true, false - if one property returned false.

Popular methods of ClassDescriptor

  • getObjectClass
    Returns a class mapped by this descriptor.
  • createObject
    Creates a new instance of a class described by this object.
  • getDeclaredProperty
    Returns a Java Bean property descriptor matching property name or null if no such property is found.
  • getDiscriminatorColumns
    Returns a collection of ObjAttribute for the described class, its superclasses and subclasses, that
  • getEntity
    Returns an ObjEntity associated with this descriptor.
  • getEntityInheritanceTree
  • getEntityQualifier
    Returns entity qualifier as a Cayenne expression that includes qualifiers for this entity and all su
  • getIdProperties
    Returns a collection of the properties mapped to id columns.
  • getMapArcProperties
    Returns a collection over the arc properties whose reverse arcs are to-many maps. I.e. for each ArcP
  • getProperty
    Returns a property descriptor matching property name, or null if no such property is found. Lookup i
  • getRootDbEntities
    Returns a collection of DbEntities that are the root tables for this descriptor's ObjEntity. Usually
  • getSubclassDescriptor
    Returns the most "specialized" descriptor for a given class. This method assumes that the following
  • getRootDbEntities,
  • getSubclassDescriptor,
  • getSuperclassDescriptor,
  • hasSubclasses,
  • injectValueHolders,
  • isFault,
  • shallowMerge,
  • visitAllProperties,
  • visitDeclaredProperties

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • 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
  • Collectors (java.util.stream)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now