Search in sources :

Example 1 with Transient

use of javax.persistence.Transient in project head by mifos.

the class RESTApprovalEntity method getApprovalMethod.

@Transient
public ApprovalMethod getApprovalMethod() throws Exception {
    if (approvalMethod == null) {
        ObjectMapper om = new ObjectMapper();
        approvalMethod = om.readValue(getMethodContent(), ApprovalMethod.class);
    }
    return approvalMethod;
}
Also used : ObjectMapper(org.codehaus.jackson.map.ObjectMapper) Transient(javax.persistence.Transient)

Example 2 with Transient

use of javax.persistence.Transient in project opennms by OpenNMS.

the class BridgeBridgeLink method printTopology.

@Transient
public String printTopology() {
    final StringBuilder strbfr = new StringBuilder();
    strbfr.append("bridge link:[nodeid:[");
    strbfr.append(getNode().getId());
    strbfr.append("], bridgeport:");
    strbfr.append(getBridgePort());
    strbfr.append(", designatednodeid:[");
    strbfr.append(getDesignatedNode().getId());
    strbfr.append("], designatedbridgeport: ");
    strbfr.append(getDesignatedPort());
    strbfr.append("]\n");
    return strbfr.toString();
}
Also used : ToStringBuilder(org.apache.commons.lang.builder.ToStringBuilder) Transient(javax.persistence.Transient)

Example 3 with Transient

use of javax.persistence.Transient in project OpenOLAT by OpenOLAT.

the class AssessmentTestSession method getFinalScore.

/**
 * @return The score + manual score
 */
@Transient
public default BigDecimal getFinalScore() {
    BigDecimal finalScore = getScore();
    BigDecimal manualScore = getManualScore();
    if (finalScore == null) {
        finalScore = manualScore;
    } else if (manualScore != null) {
        finalScore = finalScore.add(manualScore);
    }
    return finalScore;
}
Also used : BigDecimal(java.math.BigDecimal) Transient(javax.persistence.Transient)

Example 4 with Transient

use of javax.persistence.Transient in project siesta by cadenzauk.

the class MethodUtilTest method annotationsPresent.

@Test
void annotationsPresent() {
    Method method = MethodUtil.fromReference(TestDerivedClass.class, TestClass::method2);
    Stream<Transient> annotations = MethodUtil.annotations(Transient.class, method);
    assertThat(annotations.count(), is(1L));
}
Also used : Method(java.lang.reflect.Method) Transient(javax.persistence.Transient) Test(org.junit.jupiter.api.Test)

Example 5 with Transient

use of javax.persistence.Transient in project simplejpa by appoxy.

the class AnnotationManager method putMethods.

private void putMethods(AnnotationInfo ai, Class c) {
    Method[] methods = c.getDeclaredMethods();
    for (Method method : methods) {
        // logger.fine("method=" + method.getName());
        String methodName = method.getName();
        if (!methodName.startsWith("get"))
            continue;
        // System.out.println("method=" + methodName);
        if (config.isGroovyBeans() && (methodName.equals("getProperty") || methodName.equals("getMetaClass")))
            continue;
        Transient transientM = method.getAnnotation(Transient.class);
        // we don't save this one
        if (transientM != null)
            continue;
        ai.addGetter(method);
    }
}
Also used : Method(java.lang.reflect.Method) Transient(javax.persistence.Transient)

Aggregations

Transient (javax.persistence.Transient)22 ArrayList (java.util.ArrayList)6 UniqueConstraint (javax.persistence.UniqueConstraint)5 HashMap (java.util.HashMap)4 Method (java.lang.reflect.Method)3 RuleActionBean (org.akaza.openclinica.domain.rule.action.RuleActionBean)3 BigDecimal (java.math.BigDecimal)2 Date (java.util.Date)2 ManyToMany (javax.persistence.ManyToMany)2 ManyToOne (javax.persistence.ManyToOne)2 OneToMany (javax.persistence.OneToMany)2 OneToOne (javax.persistence.OneToOne)2 ToStringBuilder (org.apache.commons.lang.builder.ToStringBuilder)2 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)2 Annotation (java.lang.annotation.Annotation)1 AnnotatedElement (java.lang.reflect.AnnotatedElement)1 Field (java.lang.reflect.Field)1 DateTimeFormatter (java.time.format.DateTimeFormatter)1 List (java.util.List)1 Access (javax.persistence.Access)1