当前位置: 首页>>代码示例>>Java>>正文


Java ApiResourceProperty类代码示例

本文整理汇总了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;
}
 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:9,代码来源:ApiAnnotationIntrospector.java

示例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;
}
 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:9,代码来源:ApiAnnotationIntrospector.java

示例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);
}
 
开发者ID:saucenet,项目名称:sync,代码行数:8,代码来源:SauceEntity.java

示例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;
}
 
开发者ID:udacity,项目名称:ud859,代码行数:32,代码来源:ConferenceQueryForm.java

示例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;
}
 
开发者ID:andryfailli,项目名称:teampot,代码行数:9,代码来源:Meeting.java

示例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;
}
 
开发者ID:DawoonC,项目名称:dw-scalable,代码行数:32,代码来源:SessionQueryForm.java

示例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());
}
 
开发者ID:andryfailli,项目名称:teampot,代码行数:8,代码来源:Meeting.java

示例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());
	}
}
 
开发者ID:andryfailli,项目名称:teampot,代码行数:8,代码来源:MetricsSnapshot.java

示例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;
}
 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:6,代码来源:ApiAnnotationIntrospector.java

示例10: getFoo

import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@Override
@ApiResourceProperty(name = "bar")
public String getFoo() {
  return foo;
}
 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:6,代码来源:ApiAnnotationIntrospectorTest.java

示例11: setFoo

import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@Override
@ApiResourceProperty(name = "bar")
public void setFoo(String foo) {
  this.foo = foo;
}
 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:6,代码来源:ApiAnnotationIntrospectorTest.java

示例12: getBar

import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public String getBar() {
  return null;
}
 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:5,代码来源:ResourceSchemaProviderTest.java

示例13: getFoo

import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(name = "bar")
public String getFoo() {
  return null;
}
 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:5,代码来源:ResourceSchemaProviderTest.java

示例14: getFoo

import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(name = "baz")
public String getFoo() {
  return null;
}
 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:5,代码来源:AnnotationApiConfigGeneratorTest.java

示例15: getLastSyncedId

import com.google.api.server.spi.config.ApiResourceProperty; //导入依赖的package包/类
@ApiResourceProperty(ignored = AnnotationBoolean.TRUE)
public long getLastSyncedId() { return lastSyncedId; }
 
开发者ID:saucenet,项目名称:sync,代码行数:3,代码来源:SauceUser.java


注:本文中的com.google.api.server.spi.config.ApiResourceProperty类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。