當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。