本文整理匯總了Java中org.jboss.aerogear.android.store.generator.IdGenerator類的典型用法代碼示例。如果您正苦於以下問題:Java IdGenerator類的具體用法?Java IdGenerator怎麽用?Java IdGenerator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IdGenerator類屬於org.jboss.aerogear.android.store.generator包,在下文中一共展示了IdGenerator類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: EncryptedMemoryStore
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
public EncryptedMemoryStore(Context context, IdGenerator idGenerator, String password, Class<T> modelClass) {
memoryStore = new MemoryStore<byte[]>(idGenerator);
byte[] iv = RandomUtils.randomBytes();
EncryptionService encryptionService = org.jboss.aerogear.android.security.SecurityManager
.config(modelClass.getName(), KeyStoreBasedEncryptionConfiguration.class)
.setContext(context)
.setAlias(modelClass.getName())
.setKeyStoreFile(modelClass.getName())
.setPassword(password)
.asService();
cryptoEntityUtil = new CryptoEntityUtil<T>(encryptionService, iv, modelClass);
}
示例2: openStore
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
private SQLStore<Metric> openStore(Context context) {
DataManager.config("Favourite", SQLStoreConfiguration.class)
.withContext(context)
.withIdGenerator(new IdGenerator() {
@Override
public String generate() {
return UUID.randomUUID().toString();
}
}).store(Metric.class);
return (SQLStore<Metric>) DataManager.getStore("Favourite");
}
示例3: openStore
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
private SQLStore<Trigger> openStore(Context context) {
DataManager.config("FavouriteTriggers", SQLStoreConfiguration.class)
.withContext(context)
.withIdGenerator(new IdGenerator() {
@Override
public String generate() {
return UUID.randomUUID().toString();
}
}).store(Trigger.class);
return (SQLStore<Trigger>) DataManager.getStore("FavouriteTriggers");
}
示例4: openStore
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
private SQLStore<Metric> openStore(Context context) {
DataManager.config("FavouriteMetrics", SQLStoreConfiguration.class)
.withContext(context)
.withIdGenerator(new IdGenerator() {
@Override
public String generate() {
return UUID.randomUUID().toString();
}
}).store(Metric.class);
return (SQLStore<Metric>) DataManager.getStore("FavouriteMetrics");
}
示例5: EncryptedSQLStore
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
public EncryptedSQLStore(Class<T> modelClass, Context context, GsonBuilder builder,
IdGenerator idGenerator, String password, String tableName) {
super(context, modelClass.getSimpleName(), null, 2);
this.modelClass = modelClass;
this.context = context;
this.builder = builder;
this.idGenerator = idGenerator;
this.password = password;
this.TABLE_NAME = tableName;
}
示例6: SQLStore
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
public SQLStore(Class<T> klass, Context context, GsonBuilder builder, IdGenerator generator) {
super(context, klass.getSimpleName(), null, 1);
this.klass = klass;
this.className = klass.getSimpleName();
this.gson = builder.create();
this.generator = generator;
}
示例7: openSessionStore
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
private void openSessionStore() {
DataManager.config("sessionStore", SQLStoreConfiguration.class)
.withContext(getApplicationContext())
.withIdGenerator(new IdGenerator() {
@Override
public Serializable generate() {
return UUID.randomUUID().toString();
}
}).store(OAuth2AuthzSession.class);
sessionStore = (SQLStore<OAuth2AuthzSession>) DataManager.getStore("sessionStore");
sessionStore.openSync();
}
示例8: MemoryStore
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
public MemoryStore(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
}
示例9: withIdGenerator
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
public MemoryStoreConfiguration withIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
return this;
}
示例10: withIdGenerator
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
public EncryptedMemoryStoreConfiguration withIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
return this;
}
示例11: withIdGenerator
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
public EncryptedSQLStoreConfiguration withIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
return this;
}
示例12: withIdGenerator
import org.jboss.aerogear.android.store.generator.IdGenerator; //導入依賴的package包/類
public SQLStoreConfiguration withIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
return this;
}