javax.persistence.Table.catalog()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(247)

本文整理了Java中javax.persistence.Table.catalog()方法的一些代码示例,展示了Table.catalog()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.catalog()方法的具体详情如下:
包路径:javax.persistence.Table
类名称:Table
方法名:catalog

Table.catalog介绍

暂无

代码示例

代码示例来源:origin: abel533/Mapper

public void setTable(Table table) {
    this.name = table.name();
    this.catalog = table.catalog();
    this.schema = table.schema();
  }
}

代码示例来源:origin: abel533/Mapper

public void setTable(Table table) {
    this.name = table.name();
    this.catalog = table.catalog();
    this.schema = table.schema();
  }
}

代码示例来源:origin: hibernate/hibernate-orm

annotation.setValue( "name", table.name() );
annotation.setValue( "schema", table.schema() );
annotation.setValue( "catalog", table.catalog() );
annotation.setValue( "uniqueConstraints", table.uniqueConstraints() );
annotation.setValue( "indexes", table.indexes() );

代码示例来源:origin: ebean-orm/ebean

/**
 * Gets the table name from annotation.
 */
protected TableName getTableNameFromAnnotation(Class<?> beanClass) {
 final Table t = AnnotationUtil.findAnnotationRecursive(beanClass, Table.class);
 // Take the annotation if defined
 if (t != null && !isEmpty(t.name())) {
  // Note: empty catalog and schema are converted to null
  // Only need to convert quoted identifiers from annotations
  return new TableName(quoteIdentifiers(t.catalog()), quoteIdentifiers(t.schema()), quoteIdentifiers(t.name()));
 }
 // No annotation
 return null;
}

代码示例来源:origin: hibernate/hibernate-orm

table = tabAnn.name();
schema = tabAnn.schema();
catalog = tabAnn.catalog();
uniqueConstraints = TableBinder.buildUniqueConstraintHolders( tabAnn.uniqueConstraints() );

代码示例来源:origin: SAP/olingo-jpa-processor-v4

boolean dbEquals(final String dbCatalog, final String dbSchema, final String dbTableName) {
 final AnnotatedElement a = jpaManagedType.getJavaType();
 Table t = null;
 if (a != null)
  t = a.getAnnotation(Table.class);
 if (t == null)
  return (dbCatalog == null || dbCatalog.isEmpty())
    && (dbSchema == null || dbSchema.isEmpty())
    && dbTableName.equals(getTableName());
 else
  return dbCatalog.equals(t.catalog())
    && dbSchema.equals(t.schema())
    && dbTableName.equals(t.name());
}

代码示例来源:origin: com.github.abel533/mapper

public void setTable(Table table) {
  this.name = table.name();
  this.catalog = table.catalog();
  this.schema = table.schema();
}

代码示例来源:origin: tk.mybatis/mapper-core

public void setTable(Table table) {
    this.name = table.name();
    this.catalog = table.catalog();
    this.schema = table.schema();
  }
}

代码示例来源:origin: com.hand.hap.cloud/hap-mybatis-mapper-starter

public void setTable(Table table) {
  this.name = table.name();
  this.catalog = table.catalog();
  this.schema = table.schema();
}

代码示例来源:origin: zhang-rf/mybatis-boost

public static String getTableName(Class<?> type, NameAdaptor converter) {
  return tableNameCache.computeIfAbsent(type, k -> {
    if (type.isAnnotationPresent(Table.class)) {
      Table table = type.getAnnotation(Table.class);
      String catalog = table.catalog();
      if (StringUtils.isEmpty(catalog)) {
        catalog = table.schema();
      }
      if (StringUtils.isEmpty(catalog)) {
        return table.name();
      } else {
        return String.format("`%s`.`%s`", catalog, table.name());
      }
    } else {
      return converter.adapt(type.getSimpleName());
    }
  });
}

代码示例来源:origin: com.ibeetl/beetlsql

protected void setTable(Table table) {
  name = table.name();
  if (StringKit.isNotBlank(table.schema())) {
    name = table.schema() + "." + name;
  } else if (StringKit.isNotBlank(table.catalog())) {
    name = table.catalog() + "." + name;
  }
}
protected void addProp(String col, String prop) {

代码示例来源:origin: BatooOrg/BatooJPA

/**
 * @param locator
 *            the java locator
 * @param annotation
 *            the annotation
 * 
 * @since 2.0.0
 */
public TableMetadataImpl(AbstractLocator locator, Table annotation) {
  super();
  this.locator = locator;
  this.catalog = annotation.catalog();
  this.schema = annotation.schema();
  this.name = annotation.name();
  for (final UniqueConstraint constraint : annotation.uniqueConstraints()) {
    this.uniqueConstraints.add(new UniqueConstraintMetadataImpl(locator, constraint));
  }
}

代码示例来源:origin: org.batoo.jpa/batoo-jpa

/**
 * @param locator
 *            the java locator
 * @param annotation
 *            the annotation
 * 
 * @since 2.0.0
 */
public TableMetadataImpl(AbstractLocator locator, Table annotation) {
  super();
  this.locator = locator;
  this.catalog = annotation.catalog();
  this.schema = annotation.schema();
  this.name = annotation.name();
  for (final UniqueConstraint constraint : annotation.uniqueConstraints()) {
    this.uniqueConstraints.add(new UniqueConstraintMetadataImpl(locator, constraint));
  }
}

代码示例来源:origin: org.hibernate/hibernate-annotations

annotation.setValue( "name", table.name() );
annotation.setValue( "schema", table.schema() );
annotation.setValue( "catalog", table.catalog() );
annotation.setValue( "uniqueConstraints", table.uniqueConstraints() );

代码示例来源:origin: toplink.essentials/toplink-essentials

/**
 * INTERNAL:
 */
public MetadataTable(Table table, MetadataLogger logger) {
  this(logger);
  
  if (table != null) {
    m_name = table.name();
    m_schema = table.schema();
    m_catalog = table.catalog();
    
    processName();
    processUniqueConstraints(table.uniqueConstraints());        
  }
}

代码示例来源:origin: org.hibernate/hibernate-annotations

table = tabAnn.name();
schema = tabAnn.schema();
catalog = tabAnn.catalog();
uniqueConstraints = TableBinder.buildUniqueConstraintHolders( tabAnn.uniqueConstraints() );

代码示例来源:origin: io.ebean/ebean

/**
 * Gets the table name from annotation.
 */
protected TableName getTableNameFromAnnotation(Class<?> beanClass) {
 final Table t = AnnotationUtil.findAnnotationRecursive(beanClass, Table.class);
 // Take the annotation if defined
 if (t != null && !isEmpty(t.name())) {
  // Note: empty catalog and schema are converted to null
  // Only need to convert quoted identifiers from annotations
  return new TableName(quoteIdentifiers(t.catalog()), quoteIdentifiers(t.schema()), quoteIdentifiers(t.name()));
 }
 // No annotation
 return null;
}

代码示例来源:origin: org.avaje.ebean/ebean

/**
 * Gets the table name from annotation.
 */
protected TableName getTableNameFromAnnotation(Class<?> beanClass) {
 final Table t = findTableAnnotation(beanClass);
 // Take the annotation if defined
 if (t != null && !isEmpty(t.name())) {
  // Note: empty catalog and schema are converted to null
  // Only need to convert quoted identifiers from annotations
  return new TableName(quoteIdentifiers(t.catalog()), quoteIdentifiers(t.schema()), quoteIdentifiers(t.name()));
 }
 // No annotation
 return null;
}

代码示例来源:origin: org.avaje/ebean

/**
 * Gets the table name from annotation.
 */
protected TableName getTableNameFromAnnotation(Class<?> beanClass) {
  final Table t = findTableAnnotation(beanClass);
  // Take the annotation if defined
  if (t != null && !isEmpty(t.name())) {
    // Note: empty catalog and schema are converted to null
    // Only need to convert quoted identifiers from annotations
    return new TableName(quoteIdentifiers(t.catalog()), quoteIdentifiers(t.schema()),
        quoteIdentifiers(t.name()));
  }
  // No annotation
  return null;
}

代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-api

/**
 * Gets the table name from annotation.
 */
protected TableName getTableNameFromAnnotation(Class<?> beanClass) {
 final Table t = findTableAnnotation(beanClass);
 // Take the annotation if defined
 if (t != null && !isEmpty(t.name())) {
  // Note: empty catalog and schema are converted to null
  // Only need to convert quoted identifiers from annotations
  return new TableName(quoteIdentifiers(t.catalog()), quoteIdentifiers(t.schema()),
    quoteIdentifiers(t.name()));
 }
 // No annotation
 return null;
}

相关文章

微信公众号

最新文章

更多