本文整理汇总了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;
}