ClassMapping.getJoinablePCSuperclassMapping
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.apache.openjpa.jdbc.meta.ClassMapping.getJoinablePCSuperclassMapping (Showing top 20 results out of 315)

  • Common ways to obtain ClassMapping
private void myMethod () {
ClassMapping c =
  • OpenJPAStateManager sm;(ClassMapping) sm.getMetaData()
  • Discriminator disc;disc.getClassMapping()
  • Result res;res.getBaseMapping()
  • Smart code suggestions by Codota
}
origin: org.apache.openjpa/openjpa-all

public boolean hasClassConditions(ClassMapping base, boolean subclasses) {
  // if selecting the first mapped class and all subclasses, no need
  // to limit the query
  if (isFinal || (base.getJoinablePCSuperclassMapping() == null
    && subclasses))
    return false;
  // if no subclasses or superclass, no need for conditions
  ClassMapping[] subs = base.getJoinablePCSubclassMappings();
  if (subs.length == 0 && base.getJoinablePCSuperclassMapping() == null)
    return false;
  return true;
}
origin: org.apache.openjpa/openjpa-all

/**
 * Return whether we can reach the given subclass via joins.
 */
private boolean isSubJoinable(ClassMapping sub) {
  if (sub == null)
    return false;
  if (sub == this)
    return true;
  return isSubJoinable(sub.getJoinablePCSuperclassMapping());
}
origin: org.apache.openjpa/openjpa-all

/**
 * Return the base table for the given instance.
 */
private static Table getBaseTable(OpenJPAStateManager sm) {
  ClassMapping cls = (ClassMapping) sm.getMetaData();
  while (cls.getJoinablePCSuperclassMapping() != null)
    cls = cls.getJoinablePCSuperclassMapping();
  return cls.getTable();
}
origin: org.apache.openjpa/openjpa-jdbc

/**
 * Return the base table for the given instance.
 */
private static Table getBaseTable(OpenJPAStateManager sm) {
  ClassMapping cls = (ClassMapping) sm.getMetaData();
  while (cls.getJoinablePCSuperclassMapping() != null)
    cls = cls.getJoinablePCSuperclassMapping();
  return cls.getTable();
}
origin: org.apache.openjpa/openjpa-jdbc

/**
 * Return whether we can reach the given subclass via joins.
 */
private boolean isSubJoinable(ClassMapping sub) {
  if (sub == null)
    return false;
  if (sub == this)
    return true;
  return isSubJoinable(sub.getJoinablePCSuperclassMapping());
}
origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Return the base table for the given instance.
 */
private static Table getBaseTable(OpenJPAStateManager sm) {
  ClassMapping cls = (ClassMapping) sm.getMetaData();
  while (cls.getJoinablePCSuperclassMapping() != null)
    cls = cls.getJoinablePCSuperclassMapping();
  return cls.getTable();
}
origin: org.apache.openjpa/openjpa-jdbc

/**
 * Return whether our defining mapping is an unjoined subclass of
 * the type of the given value.
 */
private boolean isTypeUnjoinedSubclass(ValueMapping mapped) {
  ClassMapping def = field.getDefiningMapping();
  for (; def != null; def = def.getJoinablePCSuperclassMapping())
    if (def == mapped.getTypeMapping())
      return false;
  return true;
}
origin: org.apache.openejb.patch/openjpa-jdbc

protected List<SQLBuffer> getLockRows(DBDictionary dict, Object id, ClassMapping mapping,
    JDBCFetchConfiguration fetch, SQLFactory factory) {
  while (mapping.getJoinablePCSuperclassMapping() != null)
    mapping = mapping.getJoinablePCSuperclassMapping();
  // select only the PK columns, since we just want to lock
  Select select = factory.newSelect();
  select.select(mapping.getPrimaryKeyColumns());
  select.wherePrimaryKey(id, mapping, _store);
  List<SQLBuffer> sqls = new ArrayList<SQLBuffer>();
  sqls.add(select.toSelect(true, fetch));
  return sqls;
}

origin: org.apache.openejb.patch/openjpa

protected List<SQLBuffer> getLockRows(DBDictionary dict, Object id, ClassMapping mapping,
    JDBCFetchConfiguration fetch, SQLFactory factory) {
  while (mapping.getJoinablePCSuperclassMapping() != null)
    mapping = mapping.getJoinablePCSuperclassMapping();
  // select only the PK columns, since we just want to lock
  Select select = factory.newSelect();
  select.select(mapping.getPrimaryKeyColumns());
  select.wherePrimaryKey(id, mapping, _store);
  List<SQLBuffer> sqls = new ArrayList<SQLBuffer>();
  sqls.add(select.toSelect(true, fetch));
  return sqls;
}

origin: org.apache.openejb.patch/openjpa

/**
 * Return whether our defining mapping is an unjoined subclass of
 * the type of the given value.
 */
private boolean isTypeUnjoinedSubclass(ValueMapping mapped) {
  ClassMapping def = field.getDefiningMapping();
  for (; def != null; def = def.getJoinablePCSuperclassMapping())
    if (def == mapped.getTypeMapping())
      return false;
  return true;
}
origin: org.apache.openejb.patch/openjpa

public Object getStrategy(Version vers, boolean adapt) {
  ClassMapping cls = vers.getClassMapping();
  if ((adapt || defaultMissingInfo())
    && cls.getJoinablePCSuperclassMapping() == null
    && cls.getVersionField() == null)
    return _versionStrategy;
  return null;
}
origin: org.apache.openjpa/openjpa-all

public Object getStrategy(Discriminator disc, boolean adapt) {
  ClassMapping cls = disc.getClassMapping();
  if ((adapt || defaultMissingInfo())
    && cls.getJoinablePCSuperclassMapping() == null
    && disc.getMappingInfo().getValue() == null)
    return _discStrategy;
  return null;
}
origin: org.apache.openjpa/openjpa-jdbc

public Object getStrategy(Discriminator disc, boolean adapt) {
  ClassMapping cls = disc.getClassMapping();
  if ((adapt || defaultMissingInfo())
    && cls.getJoinablePCSuperclassMapping() == null
    && disc.getMappingInfo().getValue() == null)
    return _discStrategy;
  return null;
}
origin: org.apache.openjpa/com.springsource.org.apache.openjpa

public Object getStrategy(Discriminator disc, boolean adapt) {
  ClassMapping cls = disc.getClassMapping();
  if ((adapt || defaultMissingInfo())
    && cls.getJoinablePCSuperclassMapping() == null
    && disc.getMappingInfo().getValue() == null)
    return _discStrategy;
  return null;
}
origin: org.apache.openjpa/openjpa-jdbc

public int orderByPrimaryKey(ClassMapping mapping, boolean asc,
  Joins joins, boolean select) {
  ClassMapping pks = mapping;
  while (!pks.isPrimaryKeyObjectId(true))
    pks = pks.getJoinablePCSuperclassMapping();
  Column[] cols = pks.getPrimaryKeyColumns();
  recordOrderColumns(cols, asc);
  return sel.orderByPrimaryKey(mapping, asc, joins, select,
    isUnion());
}
origin: org.apache.openejb.patch/openjpa-jdbc

public int orderByPrimaryKey(ClassMapping mapping, boolean asc,
  Joins joins, boolean select) {
  ClassMapping pks = mapping;
  while (!pks.isPrimaryKeyObjectId(true))
    pks = pks.getJoinablePCSuperclassMapping();
  Column[] cols = pks.getPrimaryKeyColumns();
  recordOrderColumns(cols, asc);
  return sel.orderByPrimaryKey(mapping, asc, joins, select,
    isUnion());
}
origin: org.apache.openejb.patch/openjpa-jdbc

public void map(boolean adapt) {
  ClassMapping cls = vers.getClassMapping();
  if (cls.getJoinablePCSuperclassMapping() != null
    || cls.getEmbeddingMetaData() != null)
    throw new MetaDataException(_loc.get("not-base-vers", cls));
  vers.getMappingInfo().assertNoSchemaComponents(vers, true);
}
origin: org.apache.openjpa/com.springsource.org.apache.openjpa

public void map(boolean adapt) {
  ClassMapping cls = vers.getClassMapping();
  if (cls.getJoinablePCSuperclassMapping() != null
    || cls.getEmbeddingMetaData() != null)
    throw new MetaDataException(_loc.get("not-base-vers", cls));
  vers.getMappingInfo().assertNoSchemaComponents(vers, true);
}
origin: org.apache.openjpa/com.springsource.org.apache.openjpa

public void map(boolean adapt) {
  ClassMapping cls = disc.getClassMapping();
  if (cls.getJoinablePCSuperclassMapping() != null
    || cls.getEmbeddingMetaData() != null)
    throw new MetaDataException(_loc.get("not-base-disc", cls));
  DiscriminatorMappingInfo info = disc.getMappingInfo();
  info.assertNoSchemaComponents(disc, true);
  // make sure outer joins are supported
  DBDictionary dict = cls.getMappingRepository().getDBDictionary();
  if (dict.joinSyntax == JoinSyntaxes.SYNTAX_TRADITIONAL)
    throw new MetaDataException(_loc.get("outer-join-support", cls));
}
origin: org.apache.openejb.patch/openjpa

public void map(boolean adapt) {
  ClassMapping cls = disc.getClassMapping();
  if (cls.getJoinablePCSuperclassMapping() != null
    || cls.getEmbeddingMetaData() != null)
    throw new MetaDataException(_loc.get("not-base-disc", cls));
  DiscriminatorMappingInfo info = disc.getMappingInfo();
  info.assertNoSchemaComponents(disc, true);
  // make sure outer joins are supported
  DBDictionary dict = cls.getMappingRepository().getDBDictionary();
  if (dict.joinSyntax == JoinSyntaxes.SYNTAX_TRADITIONAL)
    throw new MetaDataException(_loc.get("outer-join-support", cls));
}
org.apache.openjpa.jdbc.metaClassMappinggetJoinablePCSuperclassMapping

Javadoc

Return the nearest mapped superclass that can join to this class.

Popular methods of ClassMapping

  • getDiscriminator
    The class discriminator.
  • getFieldMappings
    Find the field mappings that correspond to the given columns.
  • getPCSuperclassMapping
    Convenience method to perform cast from ClassMetaData#getPCSuperclassMetaData.
  • getPrimaryKeyFieldMappings
    Convenience method to perform cast from ClassMetaData#getPrimaryKeyFields.
  • getTable
    The mapping's primary table.
  • getDefinedFieldMappings
    Convenience method to perform cast from ClassMetaData#getDefinedFields.
  • getDescribedType
  • getEmbeddingMetaData
  • getFieldMapping
    Convenience method to perform cast from ClassMetaData#getField.
  • getMappingInfo
    Raw mapping data.
  • getResolve
  • getTypeAlias
  • getResolve,
  • getTypeAlias,
  • getVersion,
  • getVersionField,
  • getVersionFieldMapping,
  • isMapped,
  • syncMappingInfo,
  • <init>,
  • addDeclaredField

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • findViewById (Activity)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)