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

templates.data.st Maven / Gradle / Ivy

package ;

import java.io.Serializable;
import poussecafe.attribute.Attribute;
import poussecafe.attribute.AttributeBuilder;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Version;

import .;
import .Id;

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

    @Override
    public Attribute\<Id> identifier() {
        return AttributeBuilder.stringId(Id.class)
                .read(() -> id)
                .write(value -> id = value)
                .build();
    }

    @Id
    private String id;

    @SuppressWarnings("unused")
    @Version
    private Long version;


    @Override
    public Attribute\ name() {
        return AttributeBuilder.single(String.class)
                .read(() -> name)
                .write(value -> name = value)
                .build();
    }

    private String name;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy