本文整理汇总了Java中com.belladati.sdk.exception.dataset.data.NoColumnsException类的典型用法代码示例。如果您正苦于以下问题:Java NoColumnsException类的具体用法?Java NoColumnsException怎么用?Java NoColumnsException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NoColumnsException类属于com.belladati.sdk.exception.dataset.data包,在下文中一共展示了NoColumnsException类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AttributeOverwritePolicy
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
private AttributeOverwritePolicy(List<String> attributes) {
if (attributes.isEmpty()) {
throw new NoColumnsException();
}
List<String> temp = new ArrayList<String>(attributes);
this.attributes = Collections.unmodifiableList(temp);
}
示例2: DataTable
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
private DataTable(List<DataColumn> columns) throws NoColumnsException {
if (columns.isEmpty()) {
throw new NoColumnsException();
}
this.columns = Collections.unmodifiableList(new ArrayList<DataColumn>(columns));
}
示例3: emptyDataSetTable
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
/** data set without columns can't create import table */
@Test(expectedExceptions = NoColumnsException.class)
public void emptyDataSetTable() {
DataSet dataSet = new DataSetImpl(getService(), builder.buildDataSetNode(id, name, description, owner, lastChange));
dataSet.createDataTable();
}
示例4: attributesNone
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
/** no attributes set */
@Test(expectedExceptions = NoColumnsException.class)
public void attributesNone() {
OverwritePolicy.byAttributes(Collections.<String> emptyList());
}
示例5: noColumns
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
/** table must have columns */
@Test(expectedExceptions = NoColumnsException.class)
public void noColumns() {
DataTable.createBasicInstance(Collections.<String> emptyList());
}
示例6: emptyDataSetTable
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
/** data set without columns can't create import table */
@Test(expectedExceptions = NoColumnsException.class)
public void emptyDataSetTable() {
DataSet dataSet = new DataSetImpl(service, builder.buildDataSetNode(id, name, description, owner, lastChange));
dataSet.createDataTable();
}
示例7: createBasicInstance
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
/**
* Creates a new instance with the given column setup. At least one column
* must be specified in the table. Rows are allowed to be empty.
* <p>
* Columns should be unique, but the table doesn't enforce this.
*
* @param columns columns for the table
* @return new DataTable
* @throws NoColumnsException if the list is empty
*/
public static DataTable createBasicInstance(List<String> columns) throws NoColumnsException {
List<DataColumn> list = new ArrayList<DataColumn>();
for (String column : columns) {
list.add(new DataColumn(column));
}
return new DataTable(list);
}
示例8: createDetailedInstance
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
/**
* Creates a new instance with the given column setup. At least one column
* must be specified in the table. Rows are allowed to be empty.
* <p>
* Columns should be unique, but the table doesn't enforce this.
*
* @param columns columns for the table
* @return mew data table
* @throws NoColumnsException if the list is empty
*/
public static DataTable createDetailedInstance(List<DataColumn> columns) throws NoColumnsException {
return new DataTable(columns);
}
示例9: byAttributes
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
/**
* Returns an {@link OverwritePolicy} that deletes records that are
* identical in the specified attributes with a record being imported. As a
* result, no two records can exist in the data set that have the same
* values for all of those attributes at once. <br>
* At least one attribute needs to be specified.
* <p>
* Empty attribute values in existing data are treated as matching anything.
* Existing records that match an imported record on all non-empty
* attributes are deleted.
*
* @param attributes attributes to match
* @return a policy deleting non-unique data by selected attributes
* @throws NoColumnsException if the list is empty
*/
public static OverwritePolicy byAttributes(List<String> attributes) throws NoColumnsException {
return new AttributeOverwritePolicy(attributes);
}
示例10: createDataTable
import com.belladati.sdk.exception.dataset.data.NoColumnsException; //导入依赖的package包/类
/**
* Returns an empty data table matching this data set's structure. Populate
* this table in order to import data for the data set.
*
* @return an empty data table matching this data set's structure
* @throws NoColumnsException if the data set doesn't have any columns
*/
DataTable createDataTable() throws NoColumnsException;