當前位置: 首頁>>代碼示例>>Java>>正文


Java CachedList.load方法代碼示例

本文整理匯總了Java中com.belladati.sdk.util.CachedList.load方法的典型用法代碼示例。如果您正苦於以下問題:Java CachedList.load方法的具體用法?Java CachedList.load怎麽用?Java CachedList.load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.belladati.sdk.util.CachedList的用法示例。


在下文中一共展示了CachedList.load方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: loadDataSource

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Import is loaded correctly from getService(). */
public void loadDataSource() {
	registerSingleImport(
		builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval, customIntervalLength));

	CachedList<DataSourceImport> imports = getService().getDataSourceImports(dsId);
	imports.load();
	server.assertRequestUris(importUri);
	assertEquals(imports.toList().size(), 1);

	DataSourceImport exec = imports.toList().get(0);

	assertEquals(exec.getId(), id);
	assertEquals(exec.getCallerName(), caller);
	Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
	expectedImport.set(2012, 3, 16, 10, 17, 26);
	expectedImport.set(Calendar.MILLISECOND, 0);
	assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
	assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
	assertTrue(exec.isOverwriting());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:22,代碼來源:DataSourceImportTest.java

示例2: loadFromDataSet

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Import is loaded correctly from data source. */
public void loadFromDataSet() {
	registerSingleImport(
		builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval, customIntervalLength));

	DataSource source = new DataSourceImpl(getService(), builder.buildDataSourceNode(dsId, "", ""));
	CachedList<DataSourceImport> imports = source.getImports();
	imports.load();
	server.assertRequestUris(importUri);
	assertEquals(imports.toList().size(), 1);

	DataSourceImport exec = imports.toList().get(0);

	assertEquals(exec.getId(), id);
	assertEquals(exec.getCallerName(), caller);
	Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
	expectedImport.set(2012, 3, 16, 10, 17, 26);
	expectedImport.set(Calendar.MILLISECOND, 0);
	assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
	assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
	assertTrue(exec.isOverwriting());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:23,代碼來源:DataSourceImportTest.java

示例3: loadDataSource

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Data source is loaded correctly from service. */
public void loadDataSource() {
	registerSingleDataSource(builder.buildDataSourceNode(id, name, type));

	CachedList<DataSource> dataSources = getService().getDataSources(dsId);
	dataSources.load();
	server.assertRequestUris(dataSourcesUri);
	assertEquals(dataSources.toList().size(), 1);

	DataSource source = dataSources.toList().get(0);

	assertEquals(source.getId(), id);
	assertEquals(source.getName(), name);
	assertEquals(source.getType(), type);

	assertEquals(source.toString(), name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:18,代碼來源:DataSourcesTest.java

示例4: loadFromDataSet

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Data source is loaded correctly from data set. */
public void loadFromDataSet() {
	registerSingleDataSource(builder.buildDataSourceNode(id, name, type));

	DataSet dataSet = new DataSetImpl(getService(), builder.buildDataSetNode(dsId, "", null, null, null));
	CachedList<DataSource> dataSources = dataSet.getDataSources();
	dataSources.load();
	server.assertRequestUris(dataSourcesUri);
	assertEquals(dataSources.toList().size(), 1);

	DataSource source = dataSources.toList().get(0);

	assertEquals(source.getId(), id);
	assertEquals(source.getName(), name);
	assertEquals(source.getType(), type);

	assertEquals(source.toString(), name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:19,代碼來源:DataSourcesTest.java

示例5: loadForms_withElements

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
public void loadForms_withElements() {
	server.registerPaginatedItem(baseUri, "importForms", builder.buildFormNode(id, name, recordTimestamp, testElements()));

	CachedList<Form> list = getService().getImportForms();
	list.load();
	server.assertRequestUris(baseUri);
	assertEquals(list.get().size(), 1);

	Form form = list.get().get(0);
	assertEquals(form.getId(), id);
	assertEquals(form.getName(), name);
	assertEquals(form.getRecordTimestamp() + "", recordTimestamp);
	assertEquals(form.toString(), name);
	assertEquals(form.getElements().size(), 6);
	assertElements(form.getElements());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:17,代碼來源:FormTest.java

示例6: loadDomainInfo

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Regular domain info data is loaded correctly. */
public void loadDomainInfo() {
	server.registerPaginatedItem(baseUri, "domains", builder.buildDomainInfoNode(id, name, description, active));

	CachedList<DomainInfo> infos = getService().getDomainInfo();
	infos.load();
	server.assertRequestUris(baseUri);
	assertEquals(infos.get().size(), 1);

	DomainInfo info = infos.get().get(0);
	assertEquals(info.getId(), id);
	assertEquals(info.getName(), name);
	assertEquals(info.getDescription(), description);
	assertEquals(info.getActive() + "", active);
	assertEquals(info.toString(), name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:17,代碼來源:DomainTest.java

示例7: loadUsers_withoutGroupFilter

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Users (without group filter) are loaded correctly from getService(). */
public void loadUsers_withoutGroupFilter() {
	registerSingleUser(builder.buildUserNode(user_id, user_name, "", "", "", "", "", "", null, null, id, null, null));

	ObjectNode node = builder.buildDomainNode(id, name, description, dateFormat, timeFormat, timeZone, locale, active);
	Domain domain = new DomainImpl(getService(), node);
	CachedList<User> list = domain.loadUsers(null);
	list.load();
	server.assertRequestUris(usersUri);
	assertEquals(list.toList().size(), 1);

	User item = list.toList().get(0);

	assertEquals(item.getId(), user_id);
	assertEquals(item.getUsername(), user_name);
	assertEquals(item.getDomainId(), id);
	assertEquals(item.getUserGroups().size(), 0);

	assertEquals(item.toString(), user_name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:21,代碼來源:DomainTest.java

示例8: loadUsers_withGroupFilter

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Users (with group filter) are loaded correctly from getService(). */
public void loadUsers_withGroupFilter() {
	registerSingleUser(
		builder.buildUserNode(user_id, user_name, "", "", "", "", "", "", null, null, id, null, userGroupsJson));

	ObjectNode infoJson = builder.buildDomainInfoNode(id, name, description, active);
	DomainInfo domainInfo = new DomainInfoImpl(getService(), infoJson);
	CachedList<User> list = domainInfo.loadUsers(userGroup_id);
	list.load();
	server.assertRequestUris(usersUri);
	assertEquals(list.toList().size(), 1);

	User item = list.toList().get(0);

	assertEquals(item.getId(), user_id);
	assertEquals(item.getUsername(), user_name);
	assertEquals(item.getDomainId(), id);
	assertEquals(item.getUserGroups().size(), 1);
	UserGroup[] groups = item.getUserGroups().toArray(new UserGroup[1]);
	assertEquals(groups[0].getId(), userGroup_id);
	assertEquals(groups[0].getName(), userGroup_name);
	assertEquals(groups[0].getDescription(), "");

	assertEquals(item.toString(), user_name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:26,代碼來源:DomainTest.java

示例9: loadUserGroups_fromDomain

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Loads UserGroups from Domain. */
public void loadUserGroups_fromDomain() {
	ObjectNode infoJson = builder.buildDomainInfoNode(id, name, description, active);
	server.register(apiUri + id, infoJson.toString());
	registerSingleUserGroup(builder.buildUserGroupNode(userGroup_id, userGroup_name, description));

	DomainInfo domainInfo = new DomainInfoImpl(getService(), infoJson);
	assertEquals(domainInfo.getId(), id);
	Domain domain = domainInfo.loadDetails();
	CachedList<UserGroup> list = domain.loadUserGroups();

	list.load();
	assertEquals(list.toList().size(), 1);

	UserGroup item = list.toList().get(0);
	assertEquals(item.getId(), userGroup_id);
	assertEquals(item.getName(), userGroup_name);
	assertEquals(item.getDescription(), description);
	assertEquals(item.toString(), userGroup_name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:21,代碼來源:DomainTest.java

示例10: loadUserGroups_fromDomainInfo

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Loads UserGroups from DomainInfo. */
public void loadUserGroups_fromDomainInfo() {
	registerSingleUserGroup(builder.buildUserGroupNode(userGroup_id, userGroup_name, description));

	ObjectNode infoJson = builder.buildDomainInfoNode(id, name, description, active);
	DomainInfo domainInfo = new DomainInfoImpl(getService(), infoJson);
	assertEquals(domainInfo.getId(), id);
	CachedList<UserGroup> list = domainInfo.loadUserGroups();

	list.load();
	assertEquals(list.toList().size(), 1);

	UserGroup item = list.toList().get(0);
	assertEquals(item.getId(), userGroup_id);
	assertEquals(item.getName(), userGroup_name);
	assertEquals(item.getDescription(), description);
	assertEquals(item.toString(), userGroup_name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:19,代碼來源:DomainTest.java

示例11: loadDataSource

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Import is loaded correctly from service. */
public void loadDataSource() {
	CachedList<DataSourceImport> imports = service.getDataSourceImports(dsId);

	registerSingleImport(builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval,
		customIntervalLength));

	imports.load();
	server.assertRequestUris(importUri);
	assertEquals(imports.toList().size(), 1);

	DataSourceImport exec = imports.toList().get(0);

	assertEquals(exec.getId(), id);
	assertEquals(exec.getCallerName(), caller);
	Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
	expectedImport.set(2012, 3, 16, 10, 17, 26);
	expectedImport.set(Calendar.MILLISECOND, 0);
	assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
	assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
	assertTrue(exec.isOverwriting());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:23,代碼來源:DataSourceImportTest.java

示例12: loadFromDataSet

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Import is loaded correctly from data source. */
public void loadFromDataSet() {
	DataSource source = new DataSourceImpl(service, builder.buildDataSourceNode(dsId, "", ""));
	CachedList<DataSourceImport> imports = source.getImports();

	registerSingleImport(builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval,
		customIntervalLength));

	imports.load();
	server.assertRequestUris(importUri);
	assertEquals(imports.toList().size(), 1);

	DataSourceImport exec = imports.toList().get(0);

	assertEquals(exec.getId(), id);
	assertEquals(exec.getCallerName(), caller);
	Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
	expectedImport.set(2012, 3, 16, 10, 17, 26);
	expectedImport.set(Calendar.MILLISECOND, 0);
	assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
	assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
	assertTrue(exec.isOverwriting());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:24,代碼來源:DataSourceImportTest.java

示例13: loadDataSource

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Data source is loaded correctly from service. */
public void loadDataSource() {
	CachedList<DataSource> dataSources = service.getDataSources(dsId);

	registerSingleDataSource(builder.buildDataSourceNode(id, name, type));

	dataSources.load();
	server.assertRequestUris(dataSourcesUri);
	assertEquals(dataSources.toList().size(), 1);

	DataSource source = dataSources.toList().get(0);

	assertEquals(source.getId(), id);
	assertEquals(source.getName(), name);
	assertEquals(source.getType(), type);

	assertEquals(source.toString(), name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:19,代碼來源:DataSourcesTest.java

示例14: loadFromDataSet

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
/** Data source is loaded correctly from data set. */
public void loadFromDataSet() {
	DataSet dataSet = new DataSetImpl(service, builder.buildDataSetNode(dsId, "", null, null, null));
	CachedList<DataSource> dataSources = dataSet.getDataSources();

	registerSingleDataSource(builder.buildDataSourceNode(id, name, type));

	dataSources.load();
	server.assertRequestUris(dataSourcesUri);
	assertEquals(dataSources.toList().size(), 1);

	DataSource source = dataSources.toList().get(0);

	assertEquals(source.getId(), id);
	assertEquals(source.getName(), name);
	assertEquals(source.getType(), type);

	assertEquals(source.toString(), name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:20,代碼來源:DataSourcesTest.java

示例15: loadForms_withoutElements

import com.belladati.sdk.util.CachedList; //導入方法依賴的package包/類
public void loadForms_withoutElements() {
	server.registerPaginatedItem(baseUri, "importForms", builder.buildFormNode(id, name, recordTimestamp));

	CachedList<Form> list = getService().getImportForms();
	list.load();
	server.assertRequestUris(baseUri);
	assertEquals(list.get().size(), 1);

	Form form = list.get().get(0);
	assertEquals(form.getId(), id);
	assertEquals(form.getName(), name);
	assertEquals(form.getRecordTimestamp() + "", recordTimestamp);
	assertEquals(form.getElements().size(), 0);
	assertEquals(form.toString(), name);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:16,代碼來源:FormTest.java


注:本文中的com.belladati.sdk.util.CachedList.load方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。