All Downloads are FREE. Search and download functionalities are using the official Maven repository.

poussecafe.doc.model.entitydoc.EntityDocData Maven / Gradle / Ivy

The newest version!
package poussecafe.doc.model.entitydoc;

import java.io.Serializable;
import poussecafe.attribute.Attribute;
import poussecafe.doc.model.ModuleComponentDoc;
import poussecafe.doc.model.ModuleComponentDocData;

@SuppressWarnings("serial")
public class EntityDocData implements EntityDoc.Attributes, Serializable {

    @Override
    public Attribute identifier() {
        return new Attribute() {
            @Override
            public EntityDocId value() {
                return EntityDocId.ofClassName(className);
            }

            @Override
            public void value(EntityDocId value) {
                className = value.stringValue();
            }
        };
    }

    private String className;

    @Override
    public Attribute moduleComponentDoc() {
        return new Attribute() {
            @Override
            public ModuleComponentDoc value() {
                return moduleComponentDoc.adapt();
            }

            @Override
            public void value(ModuleComponentDoc value) {
                moduleComponentDoc = ModuleComponentDocData.adapt(value);
            }
        };
    }

    private ModuleComponentDocData moduleComponentDoc;

    @Override
    public Attribute idClassName() {
        return new Attribute() {
            @Override
            public String value() {
                return idClassName;
            }

            @Override
            public void value(String value) {
                idClassName = value;
            }
        };
    }

    private String idClassName;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy