本文整理汇总了Java中com.gigaspaces.annotation.pojo.SpaceId类的典型用法代码示例。如果您正苦于以下问题:Java SpaceId类的具体用法?Java SpaceId怎么用?Java SpaceId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SpaceId类属于com.gigaspaces.annotation.pojo包,在下文中一共展示了SpaceId类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: validateClassAnnotations
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
/**
* Validates the provided class' annotations.
* Currently the only validation performed is for @Id & @SpaceId annotations
* that must be declared on the same getter.
*/
private void validateClassAnnotations(Class<?> type) {
// Validation is only relevant for Entities
if (type.getAnnotation(Entity.class) == null)
return;
for (Method getter : type.getMethods()) {
if (!getter.getName().startsWith("get"))
continue;
SpaceId spaceId = getter.getAnnotation(SpaceId.class);
boolean hasJpaId = getter.getAnnotation(Id.class) != null || getter.getAnnotation(EmbeddedId.class) != null;
if (spaceId != null || hasJpaId) {
if (!hasJpaId || spaceId == null)
throw new IllegalArgumentException("SpaceId and Id annotations must both be declared on the same property in JPA entities in type: " + type.getName());
if (spaceId.autoGenerate()) {
GeneratedValue generatedValue = getter.getAnnotation(GeneratedValue.class);
if (generatedValue == null || generatedValue.strategy() != GenerationType.IDENTITY)
throw new IllegalArgumentException(
"SpaceId with autoGenerate=true annotated property should also have a JPA GeneratedValue annotation with strategy = GenerationType.IDENTITY.");
}
break;
}
}
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:31,代码来源:StoreManager.java
示例2: getAssetId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
public Integer getAssetId() {
return assetId;
}
开发者ID:InsightEdge,项目名称:geospatial-catastrophe-modeling,代码行数:5,代码来源:Asset.java
示例3: getScenarioId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
public String getScenarioId() {
return scenarioId;
}
开发者ID:InsightEdge,项目名称:geospatial-catastrophe-modeling,代码行数:5,代码来源:GISScenario.java
示例4: getUid
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate=true)
public synchronized String getUid ()
{
return _uid;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:6,代码来源:GigaSessionManager.java
示例5: getId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId
@SpaceRouting
public String getId()
{
return _id;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:7,代码来源:GigaSessionIdManager.java
示例6: getId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
public Integer getId() {
return id;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:5,代码来源:MachinesState.java
示例7: getKey
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
@SpaceRouting
public Key getKey() {
return key;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:6,代码来源:MemcachedEntry.java
示例8: getUid
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate=true)
public String getUid()
{
return uid;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:6,代码来源:TestData2.java
示例9: getUid
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate=true)
public String getUid() {
return uid;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:5,代码来源:EmptySpaceDataObject.java
示例10: getMessage
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
public String getMessage() {
return message;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:5,代码来源:TestMessage.java
示例11: getId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = true)
public String getId() {
return id;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:5,代码来源:MockPojoFifoGrouping.java
示例12: getId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId
public Integer getId() {
return id;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:5,代码来源:Message.java
示例13: getId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId
public Integer getId() {
return _id;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:5,代码来源:ComplicatedMessage.java
示例14: getId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
/**
* The id of this object.
*/
@SpaceId(autoGenerate=true)
public String getId() {
return id;
}
开发者ID:Gigaspaces,项目名称:xap-openspaces,代码行数:8,代码来源:Data.java
示例15: getServiceProviderKey
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
public ServiceProviderKey getServiceProviderKey() {
return serviceProviderKey;
}
开发者ID:AvanzaBank,项目名称:astrix,代码行数:5,代码来源:SpaceServiceRegistryEntry.java
示例16: getRestaurantName
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
public String getRestaurantName() {
return restaurantName;
}
开发者ID:AvanzaBank,项目名称:astrix,代码行数:5,代码来源:LunchRestaurantGrade.java
示例17: getName
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceRouting
@SpaceId(autoGenerate = false)
public String getName() {
return name;
}
开发者ID:AvanzaBank,项目名称:astrix,代码行数:6,代码来源:LunchRestaurant.java
示例18: getId
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
public AccountId getId() {
return id;
}
开发者ID:AvanzaBank,项目名称:astrix,代码行数:5,代码来源:SpaceAccount.java
示例19: getName
import com.gigaspaces.annotation.pojo.SpaceId; //导入依赖的package包/类
@SpaceId(autoGenerate = false)
public String getName() {
return name;
}
开发者ID:AvanzaBank,项目名称:astrix,代码行数:5,代码来源:LunchRestaurant.java
注:本文中的com.gigaspaces.annotation.pojo.SpaceId类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论