Download Sources

com.liguorien.flex.generator
Annotation Type FlexLazy


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface FlexLazy

Used to define a property as lazy. There is 4 possible lazy modes :

The default value for each mode is true. If this annotation is not declared on a property, then the value will be false for each modes.

In the following exemple, the "contacts" property will be sent to the client, the client will read it, but the client won't return it to the server.

    public class Person  {

        private int _id;
        private String _name;
        private Person[] _contacts;

         
        @FlexLazy(serverWrite=false, clientRead=false)
        public Person[] getContacts(){
           return _contacts;
        }
        public void setContacts(Person[] contacts){
           _contact = contacts;
        }

        public int getId() {
            return _id;
        }
        public void setId(int id) {
            _id = id;
        }

        public String getName() {
            return _name;
        }
        public void setName(String name) {
            _name = name;
        }
    }
 

Version:
0.2
Author:
Nicolas Désy
See Also:
FlexGenerator.isLazy(java.beans.PropertyDescriptor, com.liguorien.flex.generator.utils.LazyMode)

Optional Element Summary
 boolean clientRead
          Indicates when the client reads data from the server
 boolean clientWrite
          Indicates when the client writes data to the server
 boolean serverRead
          Indicates when the server reads data from the client.
 boolean serverWrite
          Indicates when the server writes data to the client
 

serverRead

public abstract boolean serverRead

Indicates when the server reads data from the client.

If the value is set to true, then the server won't try to read this property from the client.

Default:
true

serverWrite

public abstract boolean serverWrite

Indicates when the server writes data to the client

If the value is set to true, then the server won't try to write this property to the client.

Default:
true

clientRead

public abstract boolean clientRead

Indicates when the client reads data from the server

If the value is set to true, then the client won't try to read this property from the server.

Default:
true

clientWrite

public abstract boolean clientWrite

Indicates when the client writes data to the server

If the value is set to true, then the client won't try to write this property to the server.

Default:
true

FlexGenerator

Copyright 2006 Nicolas Désy. All rights reserved.