Tabnine Logo
ReturningPolicy
Code IndexAdd Tabnine to your IDE (free)

How to use
ReturningPolicy
in
org.eclipse.persistence.descriptors

Best Java code snippets using org.eclipse.persistence.descriptors.ReturningPolicy (Showing top 20 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

protected void copyMainFrom(ReturningPolicy policy) {
  Collection[][] mainToCopy = policy.main;
  for (int operation = INSERT; operation <= UPDATE; operation++) {
    for (int state = RETURN_ONLY; state < MAIN_SIZE; state++) {
      addCollectionToMain(operation, state, mainToCopy[operation][state]);
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Define that the field will be returned from an insert operation.
 */
public void addFieldForInsert(DatabaseField field) {
  addField(field, true, false, false);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Define that the field will be returned from an insert operation.
 * The type may be required to bind the output parameter if not known by the mapping.
 */
public void addFieldForInsert(String qualifiedName, Class type) {
  addFieldForInsert(createField(qualifiedName, type));
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Define that the field will be returned from an update operation.
 * The type may be required to bind the output parameter if not known by the mapping.
 */
public void addFieldForUpdate(String qualifiedName, Class type) {
  addFieldForUpdate(createField(qualifiedName, type));
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Define that the field will be returned from an insert operation.
 * A field added with addFieldForInsertReturnOnly method
 * is excluded from INSERT clause during SQL generation.
 * The type may be required to bind the output parameter if not known by the mapping.
 */
public void addFieldForInsertReturnOnly(String qualifiedName, Class type) {
  addFieldForInsertReturnOnly(createField(qualifiedName, type));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Used for testing only
 */
public boolean hasEqualFieldInfos(List<Info> infosToCompare) {
  return areCollectionsEqualAsSets(getFieldInfos(), infosToCompare);
}
origin: com.haulmont.thirdparty/eclipselink

clearInitialization();
main = new Collection[NUM_OPERATIONS][MAIN_SIZE];
if (getDescriptor().isChildDescriptor()) {
  ClassDescriptor parentDescriptor = getDescriptor().getInheritancePolicy().getParentDescriptor();
  if (parentDescriptor.hasReturningPolicy()) {
    copyMainFrom(parentDescriptor.getReturningPolicy());
  Hashtable infoHashtable = removeDuplicateAndValidateInfos(session);
  Hashtable infoHashtableUnmapped = (Hashtable)infoHashtable.clone();
  for (Enumeration fields = getDescriptor().getFields().elements();
       fields.hasMoreElements();) {
    DatabaseField field = (DatabaseField)fields.nextElement();
    if (info != null) {
      infoHashtableUnmapped.remove(field);
      if (verifyFieldAndMapping(session, field)) {
        if (info.getField().getType() == null) {
          addMappedFieldToMain(field, info);
        } else {
          addMappedFieldToMain(info.getField(), info);
          fieldIsNotFromDescriptor(info.getField());
      DatabaseField field = (DatabaseField)fields.nextElement();
      Info info = (Info)infoHashtableUnmapped.get(field);
      if (verifyField(session, field, getDescriptor())) {
        if (field.getType() != null) {
          addUnmappedFieldToMain(field, info);
          fieldIsNotFromDescriptor(field);
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

protected void addMappedFieldToMain(DatabaseField field, Info info) {
  for (int operation = INSERT; operation <= UPDATE; operation++) {
    for (int state = RETURN_ONLY; state <= WRITE_RETURN; state++) {
      if (info.is(operation, state)) {
        addFieldToMain(operation, state, field);
        addFieldToMain(operation, MAPPED, field);
        addFieldToMain(operation, ALL, field);
      }
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Define that the field will be returned from an insert operation.
 * A field added with addFieldForInsertReturnOnly method
 * is excluded from INSERT clause during SQL generation.
 */
public void addFieldForInsertReturnOnly(String qualifiedName) {
  addFieldForInsertReturnOnly(qualifiedName, null);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 */
public void addFieldForInsert(String qualifiedName) {
  addFieldForInsert(qualifiedName, null);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Define that the field will be returned from an update operation.
 */
public void addFieldForUpdate(String qualifiedName) {
  addFieldForUpdate(qualifiedName, null);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 */
protected ReturningPolicy getReturningPolicy() {
  if (! m_descriptor.hasReturningPolicy()) {
    m_descriptor.setReturningPolicy(new ReturningPolicy());
  }
  
  return m_descriptor.getReturningPolicy();
}

origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

clearInitialization();
main = new Collection[NUM_OPERATIONS][MAIN_SIZE];
if (getDescriptor().isChildDescriptor()) {
  ClassDescriptor parentDescriptor = getDescriptor().getInheritancePolicy().getParentDescriptor();
  if (parentDescriptor.hasReturningPolicy()) {
    copyMainFrom(parentDescriptor.getReturningPolicy());
  Hashtable infoHashtable = removeDuplicateAndValidateInfos(session);
  Hashtable infoHashtableUnmapped = (Hashtable)infoHashtable.clone();
  for (Enumeration fields = getDescriptor().getFields().elements();
       fields.hasMoreElements();) {
    DatabaseField field = (DatabaseField)fields.nextElement();
    if (info != null) {
      infoHashtableUnmapped.remove(field);
      if (verifyFieldAndMapping(session, field)) {
        if (info.getField().getType() == null) {
          addMappedFieldToMain(field, info);
        } else {
          addMappedFieldToMain(info.getField(), info);
          fieldIsNotFromDescriptor(info.getField());
      DatabaseField field = (DatabaseField)fields.nextElement();
      Info info = (Info)infoHashtableUnmapped.get(field);
      if (verifyField(session, field, getDescriptor())) {
        if (field.getType() != null) {
          addUnmappedFieldToMain(field, info);
          fieldIsNotFromDescriptor(field);
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * PUBLIC:
 */
public void addFieldForUpdate(String qualifiedName, Class type) {
  addFieldForUpdate(createField(qualifiedName, type));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Define that the field will be returned from an insert operation.
 * A field added with addFieldForInsertReturnOnly method
 * is excluded from INSERT clause during SQL generation.
 * The type may be required to bind the output parameter if not known by the mapping.
 */
public void addFieldForInsertReturnOnly(String qualifiedName, Class type) {
  addFieldForInsertReturnOnly(createField(qualifiedName, type));
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Used for testing only
 */
public boolean hasEqualFieldInfos(Vector infosToCompare) {
  return areCollectionsEqualAsSets(getFieldInfos(), infosToCompare);
}
origin: com.haulmont.thirdparty/eclipselink

protected void addMappedFieldToMain(DatabaseField field, Info info) {
  for (int operation = INSERT; operation <= UPDATE; operation++) {
    for (int state = RETURN_ONLY; state <= WRITE_RETURN; state++) {
      if (info.is(operation, state)) {
        addFieldToMain(operation, state, field);
        addFieldToMain(operation, MAPPED, field);
        addFieldToMain(operation, ALL, field);
      }
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Define that the field will be returned from an insert operation.
 * A field added with addFieldForInsertReturnOnly method
 * is excluded from INSERT clause during SQL generation.
 */
public void addFieldForInsertReturnOnly(String qualifiedName) {
  addFieldForInsertReturnOnly(qualifiedName, null);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Define that the field will be returned from an insert operation.
 */
public void addFieldForInsert(String qualifiedName) {
  addFieldForInsert(qualifiedName, null);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Define that the field will be returned from an update operation.
 */
public void addFieldForUpdate(String qualifiedName) {
  addFieldForUpdate(qualifiedName, null);
}
org.eclipse.persistence.descriptorsReturningPolicy

Javadoc

Purpose: Allows for INSERT or UPDATE operations to return values back into the object being written. This allows for table default values, trigger or stored procedures computed values to be set back into the object. This can be used with generated SQL on the Oracle platform using the RETURNING clause, or through stored procedures on other platforms.

Most used methods

  • <init>
  • addCollectionToMain
  • addField
    INTERNAL:
  • addFieldForInsert
    PUBLIC:
  • addFieldForInsertReturnOnly
    PUBLIC:
  • addFieldForUpdate
    PUBLIC:
  • addFieldToMain
  • addMappedFieldToMain
  • addUnmappedFieldToMain
  • areCollectionsEqualAsSets
    INTERNAL: Compares two Collections as sets (ignoring the order of the elements). Note that the passe
  • clearInitialization
  • clone
    INTERNAL: Normally cloned when not yet initialized. If initialized ReturningPolicy cloned then the c
  • clearInitialization,
  • clone,
  • copyMainFrom,
  • createCollection,
  • createField,
  • fieldIsNotFromDescriptor,
  • getDescriptor,
  • getField,
  • getFieldInfos,
  • getFieldsToGenerateInsert

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top PhpStorm 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