// Path: src/main/java/net/moddity/droidnubekit/errors/DNKRecordConversionException.java
// public class DNKRecordConversionException extends Exception {
//     public DNKRecordConversionException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/net/moddity/droidnubekit/responsemodels/DNKRecord.java
// public class DNKRecord implements Serializable {
//     
//     private String recordName;
//     private String recordType;
//     private String recordChangeTag;
// 
//     @SerializedName("fields")
//     private Map<String, DNKRecordField> fields = new HashMap<>();
// 
//     private Boolean deleted;
// 
//     public String getRecordName() {
//         return recordName;
//     }
// 
//     public void setRecordName(String recordName) {
//         this.recordName = recordName;
//     }
// 
//     public String getRecordType() {
//         return recordType;
//     }
// 
//     public void setRecordType(String recordType) {
//         this.recordType = recordType;
//     }
// 
//     public String getRecordChangeTag() {
//         return recordChangeTag;
//     }
// 
//     public void setRecordChangeTag(String recordChangeTag) {
//         this.recordChangeTag = recordChangeTag;
//     }
// 
//     public Map<String, DNKRecordField> getFields() {
//         return fields;
//     }
// 
//     public void setFields(Map<String, DNKRecordField> fields) {
//         this.fields = fields;
//     }
// 
//     public Boolean getDeleted() {
//         return deleted;
//     }
// 
//     public void setDeleted(Boolean deleted) {
//         this.deleted = deleted;
//     }
// }


import net.moddity.droidnubekit.annotations.CKReference;
import net.moddity.droidnubekit.annotations.RecordName;
import net.moddity.droidnubekit.errors.DNKRecordConversionException;
import net.moddity.droidnubekit.responsemodels.DNKRecord;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
package net.moddity.droidnubekit.objects;



/**
 * Created by jaume on 16/7/15.
 */
public abstract class DNKObject implements Serializable {

    private DNKRecord record;

    public DNKObject() {
        record = new DNKRecord();
        setDefaultUUID();
    }

    public DNKRecord toRecord() {
        DNKAnnotationParser annotationParser = new DNKAnnotationParser();
        try {
            annotationParser.parseToRecord(this, record);
// Path: src/main/java/net/moddity/droidnubekit/errors/DNKRecordConversionException.java
// public class DNKRecordConversionException extends Exception {
//     public DNKRecordConversionException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/net/moddity/droidnubekit/responsemodels/DNKRecord.java
// public class DNKRecord implements Serializable {
//     
//     private String recordName;
//     private String recordType;
//     private String recordChangeTag;
// 
//     @SerializedName("fields")
//     private Map<String, DNKRecordField> fields = new HashMap<>();
// 
//     private Boolean deleted;
// 
//     public String getRecordName() {
//         return recordName;
//     }
// 
//     public void setRecordName(String recordName) {
//         this.recordName = recordName;
//     }
// 
//     public String getRecordType() {
//         return recordType;
//     }
// 
//     public void setRecordType(String recordType) {
//         this.recordType = recordType;
//     }
// 
//     public String getRecordChangeTag() {
//         return recordChangeTag;
//     }
// 
//     public void setRecordChangeTag(String recordChangeTag) {
//         this.recordChangeTag = recordChangeTag;
//     }
// 
//     public Map<String, DNKRecordField> getFields() {
//         return fields;
//     }
// 
//     public void setFields(Map<String, DNKRecordField> fields) {
//         this.fields = fields;
//     }
// 
//     public Boolean getDeleted() {
//         return deleted;
//     }
// 
//     public void setDeleted(Boolean deleted) {
//         this.deleted = deleted;
//     }
// }


// Path: src/main/java/net/moddity/droidnubekit/objects/DNKObject.java
import net.moddity.droidnubekit.annotations.CKReference;
import net.moddity.droidnubekit.annotations.RecordName;
import net.moddity.droidnubekit.errors.DNKRecordConversionException;
import net.moddity.droidnubekit.responsemodels.DNKRecord;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

package net.moddity.droidnubekit.objects;



/**
 * Created by jaume on 16/7/15.
 */
public abstract class DNKObject implements Serializable {

    private DNKRecord record;

    public DNKObject() {
        record = new DNKRecord();
        setDefaultUUID();
    }

    public DNKRecord toRecord() {
        DNKAnnotationParser annotationParser = new DNKAnnotationParser();
        try {
            annotationParser.parseToRecord(this, record);
        } catch (DNKRecordConversionException e) {