private ValidationResult notExists(final DSLContext context, final ColumnPermutation lhs, final ColumnPermutation rhs) { final Table<Record> lhsAlias = context.select(fields(lhs)) .from(tables(lhs)) .where(notNull(lhs)) .asTable(); final int violators = context.selectCount().from( selectFrom(lhsAlias).whereNotExists( context.selectOne() .from(tables(rhs)) .where(row(fields(rhs)).eq(row(lhsAlias.fields()))) ).limit(1) ).fetchOne().value1(); return new DefaultValidationResult(violators == 0); }
private final List<Table<?>> getTables0() { return Arrays.<Table<?>>asList( Authentications.AUTHENTICATIONS, CiProxies.CI_PROXIES, CiProxiesTeams.CI_PROXIES_TEAMS, GroupMembers.GROUP_MEMBERS, Groups.GROUPS, GroupsTeams.GROUPS_TEAMS, Invitations.INVITATIONS, MiscDocs.MISC_DOCS, Organizations.ORGANIZATIONS, SchemaMigrations.SCHEMA_MIGRATIONS, Teams.TEAMS, TeamsUsers.TEAMS_USERS, UserFavorites.USER_FAVORITES, UserWatches.USER_WATCHES, Users.USERS); }
private final List<Table<?>> getTables0() { return Arrays.<Table<?>>asList( Authority.AUTHORITY, Function.FUNCTION, Role.ROLE, SchemaVersion.SCHEMA_VERSION, User.USER); }
/** * Desc : Constructor of MappingQueryGenerator.java class * * @param dslContext * @param tableName */ public MappingQueryGenerator(DSLContext dslContext, final String tableName) { Meta meta = dslContext.meta(); for (Table<?> table : meta.getTables()) { if (table.getName().equalsIgnoreCase(tableName)) { this.table = table; break; } } if (this.table == null) { throw new JDBCSinkException("Table not found: " + tableName); } }
private CiProxiesTeams(String alias, Table<CiProxiesTeamsRecord> aliased) { this(alias, aliased, null); }
@Override public final List<Table<?>> getTables() { List result = new ArrayList(); result.addAll(getTables0()); return result; }
private Pages(String alias, Table<PagesRecord> aliased) { this(alias, aliased, null); }
private CiProxiesTeams(String alias, Table<CiProxiesTeamsRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private final List<Table<?>> getTables0() { return Arrays.<Table<?>>asList( Categories.CATEGORIES, Jokes.JOKES); }
private Jokes(Name alias, Table<JokesRecord> aliased) { this(alias, aliased, null); }
private Jokes(Name alias, Table<JokesRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private Categories(Name alias, Table<CategoriesRecord> aliased) { this(alias, aliased, null); }
private Invitations(String alias, Table<InvitationsRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private final List<Table<?>> getTables0() { return Arrays.<Table<?>>asList( SecUser.SEC_USER); }
private SecUser(Name alias, Table<SecUserRecord> aliased) { this(alias, aliased, null); }
private v1_Book(String alias, Table<v1_BookRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private final List<Table<?>> getTables0() { return Arrays.<Table<?>>asList( CrawlEntities.CRAWL_ENTITIES); }
private final List<Table<?>> getTables0() { return Arrays.<Table<?>>asList( Customer.CUSTOMER, Product.PRODUCT); }
private Role(String alias, Table<RoleRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private Product(String alias, Table<ProductRecord> aliased) { this(alias, aliased, null); }
private CmCiRelations(Name alias, Table<CmCiRelationsRecord> aliased) { this(alias, aliased, null); }
private CmCiRelations(Name alias, Table<CmCiRelationsRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private UserFavorites(String alias, Table<UserFavoritesRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private DjRfcRelationAttributes(Name alias, Table<DjRfcRelationAttributesRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private CmsLock(Name alias, Table<CmsLockRecord> aliased) { this(alias, aliased, null); }
private CmsLock(Name alias, Table<CmsLockRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private CmNsOpt(Name alias, Table<CmNsOptRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private v1_Book(String alias, Table<v1_BookRecord> aliased) { this(alias, aliased, null); }
private Authentications(String alias, Table<AuthenticationsRecord> aliased) { this(alias, aliased, null); }
private UserWatches(String alias, Table<UserWatchesRecord> aliased) { this(alias, aliased, null); }
private Somethingcomposite(Name alias, Table<SomethingcompositeRecord> aliased) { this(alias, aliased, null); }
private v1_Author(String alias, Table<v1_AuthorRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private MdRelations(Name alias, Table<MdRelationsRecord> aliased, Field<?>[] parameters) { super(alias, null, aliased, parameters, ""); }
private CmOpsProcState(Name alias, Table<CmOpsProcStateRecord> aliased) { this(alias, aliased, null); }