package com.baeldung.apachecayenne.persistent.auto;

import org.apache.cayenne.CayenneDataObject;
import org.apache.cayenne.exp.Property;

import com.baeldung.apachecayenne.persistent.Author;

/**
 * Class _Article was generated by Cayenne.
 * It is probably a good idea to avoid changing this class manually,
 * since it may be overwritten next time code is regenerated.
 * If you need to make any customizations, please use subclass.
 */
public abstract class _Article extends CayenneDataObject {

    private static final long serialVersionUID = 1L; 

    public static final String ID_PK_COLUMN = "id";

    public static final Property<String> CONTENT = Property.create("content", String.class);
    public static final Property<String> TITLE = Property.create("title", String.class);
    public static final Property<Author> AUTHOR = Property.create("author", Author.class);

    public void setContent(String content) {
        writeProperty("content", content);
    }
    public String getContent() {
        return (String)readProperty("content");
    }

    public void setTitle(String title) {
        writeProperty("title", title);
    }
    public String getTitle() {
        return (String)readProperty("title");
    }

    public void setAuthor(Author author) {
        setToOneTarget("author", author, true);
    }

    public Author getAuthor() {
        return (Author)readProperty("author");
    }


}
