当前位置: 首页>>代码示例>>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;未经允许,请勿转载。