package org.zstack.header.core.keystore;

import org.zstack.header.search.Inventory;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by miao on 16-8-15.
 */
@Inventory(mappingVOClass = KeystoreVO.class)
public class KeystoreInventory implements Serializable {
    private String uuid;
    private String resourceUuid;
    private String resourceType;
    private String type;
    private String content;
    private Timestamp createDate;
    private Timestamp lastOpDate;

    public static KeystoreInventory valueOf(KeystoreVO vo) {
        KeystoreInventory inv = new KeystoreInventory();
        inv.setUuid(vo.getUuid());
        inv.setResourceUuid(vo.getResourceUuid());
        inv.setResourceType(vo.getResourceType());
        inv.setType(vo.getType());
        inv.setContent(vo.getContent());
        inv.setCreateDate(vo.getCreateDate());
        inv.setLastOpDate(vo.getLastOpDate());
        return inv;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getResourceUuid() {
        return resourceUuid;
    }

    public void setResourceUuid(String resourceUuid) {
        this.resourceUuid = resourceUuid;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Timestamp getLastOpDate() {
        return lastOpDate;
    }

    public void setLastOpDate(Timestamp lastOpDate) {
        this.lastOpDate = lastOpDate;
    }

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }
}

@@ -134,16 +134,96 @@
 mestamp;
+%0Aimport java.util.ArrayList;%0Aimport java.util.Collection;%0Aimport java.util.List;
 %0A%0A/**%0A *
@@ -299,16 +299,57 @@
 VO.class
+, collectionValueOfMethod = %22valueOfList%22
 )%0Apublic
@@ -1056,32 +1056,328 @@
 urn inv;%0A    %7D%0A%0A
+    public static List%3CKeystoreInventory%3E valueOfList(Collection%3CKeystoreVO%3E vos) %7B%0A        List%3CKeystoreInventory%3E invs = new ArrayList%3CKeystoreInventory%3E(vos.size());%0A        for (KeystoreVO vo : vos) %7B%0A            invs.add(KeystoreInventory.valueOf(vo));%0A        %7D%0A        return invs;%0A    %7D%0A%0A
     public Strin

add valueOf(for collection)