Tabnine Logo
Column.getParentOrThrow
Code IndexAdd Tabnine to your IDE (free)

How to use
getParentOrThrow
method
in
com.speedment.runtime.config.Column

Best Java code snippets using com.speedment.runtime.config.Column.getParentOrThrow (Showing top 9 results out of 315)

origin: speedment/speedment

/**
 * Returns {@code true} if the two specified documents represents the same
 * element in the database. Two documents are considered same if they have
 * the same name and type and their parents are considered same.
 * 
 * @param first   the first document
 * @param second  the second document
 * @return        {@code true} if same, else {@code false}
 */
public static boolean isSame(Column first, Column second) {
  if (first.getId().equals(second.getId())) {
    final Table firstParent  = first.getParentOrThrow();
    final Table secondParent = second.getParentOrThrow();
    return isSame(firstParent, secondParent);
  } else {
    return false;
  }
}

origin: speedment/speedment

/**
 * Returns a list of all the enum constants in a particular column.
 * The list is created each time this method is called and is therefore
 * safe to edit without affecting the column.
 * <p>
 * If no enum constants was specified in the column, an exception is
 * thrown.
 * 
 * @param column  the column to retreive the constants from
 * @return        list of the constants
 */
public static List<String> enumConstantsOf(Column column) {
  return Stream.of(column.getEnumConstants()
    .orElseThrow(() -> new RuntimeException(
      "Column '" + column.getId() + 
      "' in table '" + column.getParentOrThrow().getId() + 
      "' was marked as an enum but no enum constants was specified."
    ))
    .split(",")
  ).sorted().collect(toList());
}
origin: speedment/speedment

final Table table = column.getParentOrThrow();
origin: speedment/speedment

/**
 * Returns the full name of the enum that will be generated for 
 * the specified column.
 * 
 * @param column    the column that should be implemented as an enum
 * @param injector  the injector used in the platform
 * @return          full name for the enum
 */
public static String enumNameOf(Column column, Injector injector) {
  final TranslatorSupport<Table> support = new TranslatorSupport<>(injector, column.getParentOrThrow());
  final String shortName = support.namer().javaTypeName(column.getJavaName());
  return support.generatedEntityType().getTypeName() + "." + shortName;
}

origin: speedment/speedment

private String readFromResultSet(File file, Column c, AtomicInteger position) {
  final Dbms dbms = c.getParentOrThrow().getParentOrThrow().getParentOrThrow();
    dbmsTypeOf(dbmsHandlerComponent, c.getParentOrThrow().getParentOrThrow().getParentOrThrow()),
    c.findDatabaseType()
  );
origin: speedment/speedment

/**
 * Returns the full name used in the database for the specified
 * {@link Column}. This is typically constructed by combining the table and
 * the column name with a separator, but that might be different in
 * different implementations.
 *
 * @param column the column to retrieve the name of
 * @return the full name
 */
default String fullNameOf(Column column) {
  final Table table = column.getParentOrThrow();
  final Schema schema = table.getParentOrThrow();
  return fullNameOf(schema.getName(), table.getName(), column.getName());
}
origin: speedment/speedment

final String dbmsName   = dbms.getName();
final String schemaName = ancestor(col, Schema.class).get().getName();
final String tableName  = col.getParentOrThrow().getName();
final String columnName = col.getName();
origin: com.speedment.generator/generator-standard

private String readFromResultSet(File file, Column c, AtomicInteger position) {
  final Dbms dbms = c.getParentOrThrow().getParentOrThrow().getParentOrThrow();
    dbmsTypeOf(dbmsHandlerComponent, c.getParentOrThrow().getParentOrThrow().getParentOrThrow()),
    c.findDatabaseType()
  );
origin: com.speedment.runtime/runtime-core

/**
 * Returns the full name used in the database for the specified
 * {@link Column}. This is typically constructed by combining the table and
 * the column name with a separator, but that might be different in
 * different implementations.
 *
 * @param column the column to retrieve the name of
 * @return the full name
 */
default String fullNameOf(Column column) {
  final Table table = column.getParentOrThrow();
  final Schema schema = table.getParentOrThrow();
  return fullNameOf(schema.getName(), table.getName(), column.getName());
}
com.speedment.runtime.configColumngetParentOrThrow

Popular methods of Column

  • findDatabaseType
  • getId
  • getDatabaseType
  • getName
  • getTypeMapper
  • isNullable
  • mutator
  • getJavaName
  • getEnumConstants
  • getNullableImplementation
  • isAutoIncrement
  • isEnabled
  • isAutoIncrement,
  • isEnabled,
  • getAlias,
  • getAsBoolean,
  • getAsString,
  • getColumnSize,
  • getData,
  • getDecimalDigits,
  • getOrdinalPosition

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Best plugins for Eclipse
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