public boolean evaluate(Object object) { return ((OperationFacade)object).isStatic(); } };
/** * * @see OperationFacade#getArguments() */ public Collection<ParameterFacade> getArguments() { return this.getSuperOperationFacade().getArguments(); }
/** * * @see OperationFacade#getSignature() */ public String getSignature() { return this.getSuperOperationFacade().getSignature(); }
/** * Constructs a MethodData object from an OperationFacade. * * @param metafacadeName the name of the parent class * @param operation the operation facade */ public UMLOperationData( final String metafacadeName, final OperationFacade operation) { super( metafacadeName, operation.getVisibility(), operation.isAbstract(), operation.getGetterSetterReturnTypeName(), operation.getName(), operation.getDocumentation(" * ")); for (ParameterFacade parameter : operation.getArguments()) { addArgument( new ArgumentData( parameter.getGetterSetterTypeName(), parameter.getName())); } } }
buffer.append(operation.getName()); buffer.append(operation.getVisibility()); buffer.append(operation.getReturnType().getName()); for (final ParameterFacade parameter : operation.getArguments())
/** * @see EJB3EntityFacadeLogic#handleIsFinderFindAllExists() */ @Override protected boolean handleIsFinderFindAllExists() { boolean finderExists = false; for (final Iterator iter = this.getQueryOperations().iterator(); iter.hasNext();) { final OperationFacade operation = (OperationFacade)iter.next(); if ("findAll".equalsIgnoreCase(StringUtils.trimToEmpty(operation.getName()))) { // Check for no finder arguments if (operation.getArguments().isEmpty()) { finderExists = true; break; } } } return finderExists; }
/** * <p> * The name of the model element. * </p> * @see ModelElementFacade#getName() */ public String getName() { return this.getSuperOperationFacade().getName(); }
/** * <p> * Finds the tagged value with the specified 'tagName'. In case * there are more values the first one found will be returned. * </p> * @see ModelElementFacade#findTaggedValue(String tagName) */ public Object findTaggedValue(String tagName) { return this.getSuperOperationFacade().findTaggedValue(tagName); }
/** * Checks whether the passed in operation is a query and should be using named parameters. * * @param operation the operation. * @param defaultUseNamedParameters the default value. * @return whether named parameters should be used. */ static boolean getUseNamedParameters(OperationFacade operation, boolean defaultUseNamedParameters) { ExceptionUtils.checkNull("operation", operation); boolean useNamedParameters = defaultUseNamedParameters; if (operation.isQuery()) { String useNamedParametersValue = StringUtils.trimToEmpty((String)operation .findTaggedValue(HibernateProfile.TAGGEDVALUE_HIBERNATE_USE_NAMED_PARAMETERS)); if (StringUtils.isNotBlank(useNamedParametersValue)) { useNamedParameters = Boolean.valueOf(useNamedParametersValue).booleanValue(); } } return useNamedParameters; } }
/** * @see EJB3SessionOperationFacadeLogic#handleGetTestName() */ @Override protected String handleGetTestName() { String serviceOperationTestNamePattern = (String)this.getConfiguredProperty(SERVICE_OPERATION_TEST_NAME_PATTERN); String name = this.getName(); // Determine if any overloaded operations exist - test name must be unique even if operation name is not List<OperationFacade> operations = this.getOwner().getOperations(); for (OperationFacade operation : operations) { if (operation.getName().equals(name) && !operation.getArgumentNames().equals(this.getArgumentNames())) { // Two methods with the same name different arguments exist, use argument names to distinguish for (ParameterFacade argument : this.getArguments()) { name += StringUtils.capitalize(argument.getName()); } } } // default = testOperationname[Parameternames] return MessageFormat.format( serviceOperationTestNamePattern, StringUtils.trimToEmpty(StringUtils.capitalize(name))); }
/** * * @see OperationFacade#getReturnType() */ public ClassifierFacade getReturnType() { return this.getSuperOperationFacade().getReturnType(); }
/** * <p> * The visibility (i.e. public, private, protected or package) of * the model element, will attempt a lookup for these values in the * language mappings (if any). * </p> * @see ModelElementFacade#getVisibility() */ public String getVisibility() { return this.getSuperOperationFacade().getVisibility(); }
/** * <p> * Indicates whether or not this operation is a query operation. * </p> * @see OperationFacade#isQuery() */ public boolean isQuery() { return this.getSuperOperationFacade().isQuery(); }
/** * <p> * Copies all tagged values from the given ModelElementFacade to * this model element facade. * </p> * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element) */ public void copyTaggedValues(ModelElementFacade element) { this.getSuperOperationFacade().copyTaggedValues(element); }
/** * <p> * Finds the parameter on this operation having the given name, if * no parameter is found, null is returned instead. * </p> * @see OperationFacade#findParameter(String name) */ public ParameterFacade findParameter(String name) { return this.getSuperOperationFacade().findParameter(name); }
/** * Constructs a MethodData object from an OperationFacade. * * @param metafacadeName the name of the parent class * @param operation the operation facade */ public UMLOperationData( final String metafacadeName, final OperationFacade operation) { super( metafacadeName, operation.getVisibility(), operation.isAbstract(), operation.getGetterSetterReturnTypeName(), operation.getName(), operation.getDocumentation(" * ")); for (ParameterFacade parameter : operation.getArguments()) { addArgument( new ArgumentData( parameter.getGetterSetterTypeName(), parameter.getName())); } } }
buffer.append(operation.getName()); buffer.append(operation.getVisibility()); buffer.append(operation.getReturnType().getName()); for (final ParameterFacade parameter : operation.getArguments())
/** * <p> * The name of the model element. * </p> * @see ModelElementFacade#getName() */ public String getName() { return this.getSuperOperationFacade().getName(); }
/** * <p> * Finds the tagged value with the specified 'tagName'. In case * there are more values the first one found will be returned. * </p> * @see ModelElementFacade#findTaggedValue(String tagName) */ public Object findTaggedValue(String tagName) { return this.getSuperOperationFacade().findTaggedValue(tagName); }
/** * Checks whether the passed in operation is a query and should be using named parameters. * * @param operation the operation. * @param defaultUseNamedParameters the default value. * @return whether named parameters should be used. */ static boolean getUseNamedParameters(OperationFacade operation, boolean defaultUseNamedParameters) { ExceptionUtils.checkNull("operation", operation); boolean useNamedParameters = defaultUseNamedParameters; if (operation.isQuery()) { String useNamedParametersValue = StringUtils.trimToEmpty((String)operation .findTaggedValue(SpringProfile.TAGGEDVALUE_HIBERNATE_USE_NAMED_PARAMETERS)); if (StringUtils.isNotBlank(useNamedParametersValue)) { useNamedParameters = Boolean.valueOf(useNamedParametersValue).booleanValue(); } } return useNamedParameters; } }