/** * @return an options object */ @SuppressWarnings("unchecked") @Nullable public Options getOptions() { return options == null && optionsDatasource != null ? new DatasourceOptions(optionsDatasource) : options; }
/** * Sets the given {@code datasource} as options datasource. * * @param datasource options datasource * * @deprecated use {@link TokenList#setOptions(Options)} instead */ @SuppressWarnings("unchecked") @Deprecated default void setOptionsDatasource(CollectionDatasource datasource) { setOptions(datasource == null ? null : new DatasourceOptions(datasource)); }
/** * @param datasource datasource * @deprecated set options using {@link #setOptions(Options)} with {@link DatasourceOptions}. */ @SuppressWarnings("unchecked") @Deprecated default void setOptionsDatasource(CollectionDatasource datasource) { if (datasource == null) { setOptions(null); } else { setOptions(new DatasourceOptions<>(datasource)); } }
@SuppressWarnings("unchecked") @Nullable @Override protected Options getOptions(EntityValueSource valueSource, String property) { MetaClass metaClass = valueSource.getEntityMetaClass(); MetaPropertyPath metaPropertyPath = metadataTools.resolveMetaPropertyPath(metaClass, property); Table.Column columnConf = webTable.getColumnsInternal().get(metaPropertyPath); CollectionContainer collectionContainer = findOptionsContainer(columnConf); if (collectionContainer != null) { return new ContainerOptions(collectionContainer); } CollectionDatasource ds = findOptionsDatasource(columnConf, property); if (ds != null) { return new DatasourceOptions(ds); } return null; }
.createOptionsDatasourceForLookup(metaProperty.getRange().asClass(), attribute.getJoinClause(), attribute.getWhereClause()); options = new DatasourceOptions<>(optionsDatasource);
.createOptionsDatasourceForLookup(metaProperty.getRange().asClass(), attribute.getJoinClause(), attribute.getWhereClause()); options = new DatasourceOptions(optionsDatasource);