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

com.ning.api.client.item.ContentItemBase Maven / Gradle / Ivy

There is a newer version: 0.5.1
Show newest version
package com.ning.api.client.item;

import org.codehaus.jackson.annotate.JsonProperty;
import org.joda.time.DateTime;

/**
 * Note: although we do implement {@link ContentItem}
 */
public class ContentItemBase, T extends ContentItem>
    implements ContentItem
{
    /**
     * Id of this content item; should never be null when returned via read-only
     * methods; null when constructed from scratch to create a new item
     */
    @JsonProperty
    protected Key id;
    
    @JsonProperty
    protected DateTime createdDate;

    // looks like "author" is ubiquitous as well:
    @JsonProperty
    protected String author;
    
    protected ContentItemBase() { }
    
    @JsonProperty("id")
    public final Key id() { return id; }

    public DateTime getCreatedDate() { return createdDate; }
    public String getAuthor() { return author; }

    @Override
    public String toString()
    {
        return "[Content type item of type "+getClass().getSimpleName()+"; id "+id+"]";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy