@Override public MetadataType getOutputType(MetadataContext context, Object key) throws MetadataResolvingException, ConnectionException { return context.getTypeBuilder().anyType().build(); } }
@Override public MetadataType getOutputType(MetadataContext context, Object key) throws MetadataResolvingException, ConnectionException { return context.getTypeBuilder().anyType().build(); } }
@Override public MetadataType getOutputType(MetadataContext context, Object key) throws MetadataResolvingException, ConnectionException { return context.getTypeBuilder().anyType().build(); } }
@Override public MetadataType getOutputType(MetadataContext context, Object key) throws MetadataResolvingException, ConnectionException { return context.getTypeBuilder().anyType().build(); } }
@Override public MetadataType getOutputType(MetadataContext context, String key) throws MetadataResolvingException, ConnectionException { if (!key.equals(NATIVE_QUERY)) { throw new IllegalArgumentException("Native Query Key was not the expected one"); } final ObjectTypeBuilder objectType = context.getTypeBuilder().objectType(); objectType.addField().key("id").value().numberType(); return objectType.build(); } }
@Before public void setUp() { when(context.getTypeBuilder()).thenReturn(new BaseTypeBuilder(MetadataFormat.JAVA)); }
MetadataType entityMetadata = entityResolver.getEntityMetadata(context, dsqlQuery.getType().getName()); BaseTypeBuilder builder = context.getTypeBuilder(); final List<Field> fields = dsqlQuery.getFields(); if (fields.size() == 1 && fields.get(0).getName().equals("*")) {
/** * {@inheritDoc} */ @Override public MetadataType getOutputType(MetadataContext context, WebServiceTypeKey key) throws MetadataResolvingException, ConnectionException { SoapClient client = getClient(context, key); SoapOperationMetadata metadata = client.getMetadataResolver().getOutputMetadata(key.getOperation()); return buildOutputType(metadata.getBodyType(), metadata.getHeadersType(), metadata.getAttachmentsType(), context.getTypeBuilder()); } }
private MetadataType adaptToListIfNecessary(MetadataType resolvedType, ParameterModel parameter, MetadataContext metadataContext) throws MetadataResolvingException { MetadataType inputType = parameter.getType(); if (!isCollection(inputType) || isNullType(resolvedType)) { return resolvedType; } return metadataContext.getTypeBuilder().arrayType() .with(new ClassInformationAnnotation(getType(inputType))) .of(resolvedType) .build(); } }
private MetadataType adaptToListIfNecessary(MetadataType resolvedType, Object key, MetadataContext metadataContext) throws MetadataResolvingException { MetadataType componentOutputType = ((HasOutputModel) component).getOutput().getType(); if (!isCollection(componentOutputType) || isVoid(resolvedType) || isNullType(resolvedType)) { return resolvedType; } MetadataType collectionValueType = ((ArrayType) componentOutputType).getType(); Class<?> collectionType = getCollectionType(collectionValueType); if (Message.class.equals(collectionType)) { MessageMetadataType message = (MessageMetadataType) collectionValueType; resolvedType = wrapInMessageType(resolvedType, key, metadataContext, message.getAttributesType()); } return metadataContext.getTypeBuilder().arrayType() .with(new ClassInformationAnnotation(getCollectionType(componentOutputType))) .of(resolvedType) .build(); }
@Override public MetadataType getOutputType(MetadataContext context, Object key) throws MetadataResolvingException, ConnectionException { return context.getTypeBuilder().anyType().build(); } }
@Override public MetadataType getOutputType(MetadataContext context, Object key) throws MetadataResolvingException, ConnectionException { return context.getTypeBuilder().anyType().build(); } }
@Override public MetadataType getOutputType(MetadataContext context, String key) throws MetadataResolvingException, ConnectionException { if (!key.equals(NATIVE_QUERY)) { throw new IllegalArgumentException("Native Query Key was not the expected one"); } final ObjectTypeBuilder objectType = context.getTypeBuilder().objectType(); objectType.addField().key("id").value().numberType(); return objectType.build(); } }
MetadataType entityMetadata = entityResolver.getEntityMetadata(context, dsqlQuery.getType().getName()); BaseTypeBuilder builder = context.getTypeBuilder(); final List<Field> fields = dsqlQuery.getFields(); if (fields.size() == 1 && fields.get(0).getName().equals("*")) {
private MetadataType adaptToListIfNecessary(MetadataType resolvedType, ParameterModel parameter, MetadataContext metadataContext) throws MetadataResolvingException { MetadataType inputType = parameter.getType(); if (!isCollection(inputType) || isNullType(resolvedType)) { return resolvedType; } return metadataContext.getTypeBuilder().arrayType() .with(new ClassInformationAnnotation(getType(inputType))) .of(resolvedType) .build(); } }
private MetadataType adaptToListIfNecessary(MetadataType resolvedType, Object key, MetadataContext metadataContext) throws MetadataResolvingException { MetadataType componentOutputType = ((HasOutputModel) component).getOutput().getType(); if (!isCollection(componentOutputType) || isVoid(resolvedType) || isNullType(resolvedType)) { return resolvedType; } MetadataType collectionValueType = ((ArrayType) componentOutputType).getType(); Class<?> collectionType = getCollectionType(collectionValueType); if (Message.class.equals(collectionType)) { MessageMetadataType message = (MessageMetadataType) collectionValueType; resolvedType = wrapInMessageType(resolvedType, key, metadataContext, message.getAttributesType()); } return metadataContext.getTypeBuilder().arrayType() .with(new ClassInformationAnnotation(getCollectionType(componentOutputType))) .of(resolvedType) .build(); }