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


Java Id類代碼示例

本文整理匯總了Java中com.googlecode.objectify.annotation.Id的典型用法代碼示例。如果您正苦於以下問題:Java Id類的具體用法?Java Id怎麽用?Java Id使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: OnlineVerification

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public OnlineVerification(PGPPublicKeyData pgpPublicKeyData) {
    this.Id = pgpPublicKeyData.getFingerprint(); // (@Id for PGPPublicKeyData is 'fingerprint'
    this.pgpPublicKeyDataUrlSafeKey = pgpPublicKeyData.getWebSafeString();
    this.userEmail = pgpPublicKeyData.getUserEmail();
    this.lastName = pgpPublicKeyData.getLastName();
    this.firstName = pgpPublicKeyData.getFirstName();
    this.keyID = pgpPublicKeyData.getKeyID();
    this.cryptonomicaUserId = pgpPublicKeyData.getCryptonomicaUserId();
    // old PGPPublicKeyData entities (created before 22.05.17) do not have this property
    // Birthday was stored in CryptonomicaUser entity only
    this.birthday = pgpPublicKeyData.getUserBirthday();
    //
    this.entityCreated = new Date(); // <<< ---
    this.allowedUsers = new ArrayList<>();
    this.verificationDocumentsArray = new ArrayList<>();
    this.termsAccepted = false;
    this.nationality = pgpPublicKeyData.getNationality();
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:19,代碼來源:OnlineVerification.java

示例2: VideoUploadKey

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public VideoUploadKey(User googleUser, String videoUploadKey) {
    this.Id = videoUploadKey;
    this.googleUser = googleUser;
    this.entityCreated = new Date();
    this.videoUploadKey = videoUploadKey;
    this.uploadedVideoId = null;
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:8,代碼來源:VideoUploadKey.java

示例3: VerificationVideo

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public VerificationVideo(String id,
                         User googleUser,
                         String bucketName,
                         String objectName,
                         String videoUploadKey) {
    this.Id = id;
    this.googleUser = googleUser;
    this.entityCreated = new Date();
    this.bucketName = bucketName;
    this.objectName = objectName;
    this.videoUploadKey = videoUploadKey;
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:13,代碼來源:VerificationVideo.java

示例4: VerificationDocumentsUploadKey

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public VerificationDocumentsUploadKey(User googleUser, String documentsUploadKey) {
    this.Id = documentsUploadKey;
    this.googleUser = googleUser;
    this.entityCreated = new Date();
    this.documentsUploadKey = documentsUploadKey;
    this.uploadedDocumentIds = null;
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:8,代碼來源:VerificationDocumentsUploadKey.java

示例5: VerificationDocument

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public VerificationDocument(String id,
                            User googleUser,
                            String bucketName,
                            String objectName,
                            String documentsUploadKey,
                            String fingerprint) {
    this.Id = id;
    this.googleUser = googleUser;
    this.entityCreated = new Date();
    this.bucketName = bucketName;
    this.objectName = objectName;
    this.documentsUploadKey = documentsUploadKey;
    this.fingerprint = fingerprint;
    this.hidden = false;
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:16,代碼來源:VerificationDocument.java

示例6: getSchema

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
/** Return a string representing the persisted schema of a type or enum. */
static String getSchema(Class<?> clazz) {
  StringBuilder stringBuilder = new StringBuilder();
  Stream<?> body;
  if (clazz.isEnum()) {
    stringBuilder.append("enum ");
    body = Arrays.stream(clazz.getEnumConstants());
  } else {
    stringBuilder.append("class ");
    body =
        getAllFields(clazz)
            .values()
            .stream()
            .filter(field -> !field.isAnnotationPresent(Ignore.class))
            .map(
                field -> {
                  String annotation =
                      field.isAnnotationPresent(Id.class)
                          ? "@Id "
                          : field.isAnnotationPresent(Parent.class) ? "@Parent " : "";
                  String type =
                      field.getType().isArray()
                          ? field.getType().getComponentType().getName() + "[]"
                          : field.getGenericType().toString().replaceFirst("class ", "");
                  return String.format("%s%s %s", annotation, type, field.getName());
                });
  }
  return stringBuilder
      .append(clazz.getName())
      .append(" {\n  ")
      .append(body.map(Object::toString).sorted().collect(Collectors.joining(";\n  ")))
      .append(";\n}")
      .toString();
}
 
開發者ID:google,項目名稱:nomulus,代碼行數:35,代碼來源:ModelUtils.java

示例7: key

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
private static <T> Field key (Class<T> c) {
	Field k = null;

	Field[] fs = c.getDeclaredFields();

	for (Field field : fs) {
		Annotation[] as = field.getAnnotations();

		for (Annotation annotation : as) {
			if (annotation instanceof Id) {
				try {
					k = field;
				} catch (IllegalArgumentException ex) {
					throw new RuntimeException(ex);
				}

				break;
			}
		}

		if (k != null) {
			break;
		}
	}

	if (k == null && c.getSuperclass() != Object.class) {
		k = key(c.getSuperclass());
	}

	return k;
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:32,代碼來源:PersistenceHelper.java

示例8: getId

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public String getId() {
    return Id;
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:4,代碼來源:VideoUploadKey.java

示例9: getId

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public Long getId() {
    return Id;
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:4,代碼來源:Invitation.java

示例10: setId

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public void setId(Long id) {
    Id = id;
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:4,代碼來源:Invitation.java

示例11: setId

import com.googlecode.objectify.annotation.Id; //導入依賴的package包/類
public void setId(String id) {
    Id = id;
}
 
開發者ID:Cryptonomica,項目名稱:cryptonomica,代碼行數:4,代碼來源:VerificationVideo.java


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