Package test.com.william.document

Source Code of test.com.william.document.IdCard

package test.com.william.document;

import net.csdn.common.exception.AutoGeneration;
import net.csdn.mongo.Document;
import net.csdn.mongo.association.Association;
import net.csdn.mongo.association.Options;

import static net.csdn.common.collections.WowCollections.map;

/**
* User: WilliamZhu
* Date: 12-10-22
* Time: 下午9:27
*/
public class IdCard extends Document {
    static {
        storeIn("idcards");
        belongsTo("person", new Options(map(
                Options.n_kclass, Person.class,
                Options.n_foreignKey, "person_id"
        )));
    }


    public Association person() {
        throw new AutoGeneration();
    }


    private String idNumbers;

    public String getIdNumbers() {
        return idNumbers;
    }

    public void setIdNumbers(String idNumbers) {
        this.idNumbers = idNumbers;
    }
}
TOP

Related Classes of test.com.william.document.IdCard

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.