当前位置: 首页>>代码示例>>Java>>正文


Java IdGenerator类代码示例

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

    }
 
开发者ID:aerogear,项目名称:aerogear-android-store,代码行数:18,代码来源:EncryptedMemoryStore.java

示例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");
}
 
开发者ID:hawkular,项目名称:hawkular-android-client,代码行数:12,代码来源:InventoryExplorerActivity.java

示例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");
}
 
开发者ID:hawkular,项目名称:hawkular-android-client,代码行数:12,代码来源:TriggerDetailFragment.java

示例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");
}
 
开发者ID:hawkular,项目名称:hawkular-android-client,代码行数:12,代码来源:FavMetricsFragment.java

示例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;
}
 
开发者ID:aerogear,项目名称:aerogear-android-store,代码行数:14,代码来源:EncryptedSQLStore.java

示例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;
}
 
开发者ID:aerogear,项目名称:aerogear-android-store,代码行数:8,代码来源:SQLStore.java

示例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();
}
 
开发者ID:aerogear,项目名称:aerogear-android-authz,代码行数:14,代码来源:OAuth2AuthzService.java

示例8: MemoryStore

import org.jboss.aerogear.android.store.generator.IdGenerator; //导入依赖的package包/类
public MemoryStore(IdGenerator idGenerator) {
    this.idGenerator = idGenerator;
}
 
开发者ID:aerogear,项目名称:aerogear-android-store,代码行数:4,代码来源:MemoryStore.java

示例9: withIdGenerator

import org.jboss.aerogear.android.store.generator.IdGenerator; //导入依赖的package包/类
public MemoryStoreConfiguration withIdGenerator(IdGenerator idGenerator) {
    this.idGenerator = idGenerator;
    return this;
}
 
开发者ID:aerogear,项目名称:aerogear-android-store,代码行数:5,代码来源:MemoryStoreConfiguration.java

示例10: withIdGenerator

import org.jboss.aerogear.android.store.generator.IdGenerator; //导入依赖的package包/类
public EncryptedMemoryStoreConfiguration withIdGenerator(IdGenerator idGenerator) {
    this.idGenerator = idGenerator;
    return this;
}
 
开发者ID:aerogear,项目名称:aerogear-android-store,代码行数:5,代码来源:EncryptedMemoryStoreConfiguration.java

示例11: withIdGenerator

import org.jboss.aerogear.android.store.generator.IdGenerator; //导入依赖的package包/类
public EncryptedSQLStoreConfiguration withIdGenerator(IdGenerator idGenerator) {
    this.idGenerator = idGenerator;
    return this;
}
 
开发者ID:aerogear,项目名称:aerogear-android-store,代码行数:5,代码来源:EncryptedSQLStoreConfiguration.java

示例12: withIdGenerator

import org.jboss.aerogear.android.store.generator.IdGenerator; //导入依赖的package包/类
public SQLStoreConfiguration withIdGenerator(IdGenerator idGenerator) {
    this.idGenerator = idGenerator;
    return this;
}
 
开发者ID:aerogear,项目名称:aerogear-android-store,代码行数:5,代码来源:SQLStoreConfiguration.java


注:本文中的org.jboss.aerogear.android.store.generator.IdGenerator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。