本文整理汇总了Java中com.google.api.server.spi.config.ApiResourceProperty类的典型用法代码示例。如果您正苦于以下问题:Java ApiResourceProperty类的具体用法?Java ApiResourceProperty怎么用?Java ApiResourceProperty使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ApiResourceProperty类属于com.google.api.server.spi.config包,在下文中一共展示了ApiResourceProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findNameForSerialization
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@Override
public PropertyName findNameForSerialization(Annotated a) {
ApiResourceProperty apiName = a.getAnnotation(ApiResourceProperty.class);
if (apiName != null && apiName.ignored() != AnnotationBoolean.TRUE) {
return PropertyName.construct(apiName.name());
}
return null;
}
示例2: findNameForDeserialization
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@Override
public PropertyName findNameForDeserialization(Annotated a) {
ApiResourceProperty apiName = a.getAnnotation(ApiResourceProperty.class);
if (apiName != null && apiName.ignored() != AnnotationBoolean.TRUE) {
return PropertyName.construct(apiName.name());
}
return null;
}
示例3: getKey
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public Key<SauceEntity> getKey() {
if(userKey == null || id == 0) {
return null;
}
return Key.create(userKey, SauceEntity.class, id);
}
示例4: getQuery
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
/**
* Returns an Objectify Query object for the specified filters.
*
* @return an Objectify Query.
*/
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public Query<Conference> getQuery() {
// First check the feasibility of inequality filters.
checkFilters();
Query<Conference> query = ofy().load().type(Conference.class);
if (inequalityFilter == null) {
// Order by name.
query = query.order("name");
} else {
// If we have any inequality filters, order by the field first.
query = query.order(inequalityFilter.field.getFieldName());
query = query.order("name");
}
for (Filter filter : this.filters) {
// Applies filters in order.
if (filter.field.fieldType == FieldType.STRING) {
query = query.filter(String.format("%s %s", filter.field.getFieldName(),
filter.operator.getQueryOperator()), filter.value);
} else if (filter.field.fieldType == FieldType.INTEGER) {
query = query.filter(String.format("%s %s", filter.field.getFieldName(),
filter.operator.getQueryOperator()), Integer.parseInt(filter.value));
}
}
LOG.info(query.toString());
return query;
}
示例5: getKey
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@Override
@ApiResourceProperty(name = "id")
public String getKey() {
Ref<Project> parent = this.getProject();
if (parent != null)
return Key.create(parent.getKey(),this.getClass(), this.getId()).getString();
else return null;
}
示例6: getQuery
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
/**
* Returns an Objectify Query object for the specified filters.
*
* @return an Objectify Query.
*/
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public Query<Session> getQuery() {
// First check the feasibility of inequality filters.
checkFilters();
Query<Session> query = ofy().load().type(Session.class);
if (inequalityFilter == null) {
// Order by name.
query = query.order("name");
} else {
// If we have any inequality filters, order by the field first.
query = query.order(inequalityFilter.field.getFieldName());
query = query.order("name");
}
for (Filter filter : this.filters) {
// Applies filters in order.
if (filter.field.fieldType == FieldType.STRING) {
query = query.filter(String.format("%s %s", filter.field.getFieldName(),
filter.operator.getQueryOperator()), filter.value);
} else if (filter.field.fieldType == FieldType.INTEGER) {
query = query.filter(String.format("%s %s", filter.field.getFieldName(),
filter.operator.getQueryOperator()), Integer.parseInt(filter.value));
}
}
LOG.info(query.toString());
return query;
}
示例7: setKey
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(name = "id")
public void setKey(String key) {
Key entityKey = Key.create(key);
Ref parentRef = Ref.create(entityKey.getParent());
this.setProject(parentRef);
this.setId(entityKey.getId());
}
示例8: setKey
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(name = "id")
public void setKey(String key) {
if (key != null) {
Key entityKey = Key.create(key);
this.setId(entityKey.getId());
}
}
示例9: hasIgnoreMarker
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@Override
public boolean hasIgnoreMarker(AnnotatedMember member) {
ApiResourceProperty apiProperty = member.getAnnotation(ApiResourceProperty.class);
return apiProperty != null && apiProperty.ignored() == AnnotationBoolean.TRUE;
}
示例10: getFoo
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@Override
@ApiResourceProperty(name = "bar")
public String getFoo() {
return foo;
}
示例11: setFoo
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@Override
@ApiResourceProperty(name = "bar")
public void setFoo(String foo) {
this.foo = foo;
}
示例12: getBar
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public String getBar() {
return null;
}
示例13: getFoo
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(name = "bar")
public String getFoo() {
return null;
}
示例14: getFoo
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(name = "baz")
public String getFoo() {
return null;
}
示例15: getLastSyncedId
import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public long getLastSyncedId() { return lastSyncedId; }