class PluginObject extends DbObjectBase {

    private final String implementBy;
    private final String classPath;
    private final CaseInsensitiveMap<String> parameters;
    private Plugin plugin;
    private URLClassLoader classLoader;
    private String state = "inited";

    public PluginObject(Database database, int id, String pluginName, String implementBy,
            String classPath, CaseInsensitiveMap<String> parameters) {
        super(database, id, pluginName);
        this.implementBy = implementBy;
        this.classPath = classPath;
        this.parameters = parameters;
    }

    @Override
    public DbObjectType getType() {
        return DbObjectType.PLUGIN;
    }

    public Plugin getPlugin() {
        return plugin;
    }

    public void setPlugin(Plugin plugin) {
        this.plugin = plugin;
    }

    public URLClassLoader getClassLoader() {
        return classLoader;
    }

    public void setClassLoader(URLClassLoader classLoader) {
        this.classLoader = classLoader;
    }

    public void close() {
        plugin.close();
        if (classLoader != null) {
            try {
                classLoader.close();
            } catch (IOException e) {
            }
        }
    }

    @Override
    public String getCreateSQL() {<FILL_FUNCTION_BODY>}

    public void start() {
        plugin.start();
        state = "started";
    }

    public void stop() {
        plugin.stop();
        state = "stopped";
    }

    public String getState() {
        return state;
    }
}

        StatementBuilder sql = new StatementBuilder("CREATE PLUGIN ");
        sql.append("IF NOT EXISTS ");
        sql.append(getSQL());
        sql.append(" IMPLEMENT BY '").append(implementBy).append("'");
        if (classPath != null) {
            sql.append(" CLASS PATH '").append(classPath).append("'");
        }
        if (parameters != null && !parameters.isEmpty()) {
            sql.append(" PARAMETERS");
            Database.appendMap(sql, parameters);
        }
        return sql.toString();
    
<methods>public void checkRename() ,public List<? extends com.lealone.db.DbObject> getChildren() ,public java.lang.String getComment() ,public com.lealone.db.Database getDatabase() ,public java.lang.String getDropSQL() ,public int getId() ,public long getModificationId() ,public java.lang.String getName() ,public java.lang.String getSQL() ,public void invalidate() ,public boolean isTemporary() ,public void removeChildrenAndResources(com.lealone.db.session.ServerSession, com.lealone.db.lock.DbObjectLock) ,public void rename(java.lang.String) ,public void setComment(java.lang.String) ,public void setDatabase(com.lealone.db.Database) ,public void setModified() ,public void setTemporary(boolean) ,public java.lang.String toString() <variables>protected java.lang.String comment,protected com.lealone.db.Database database,protected int id,protected long modificationId,protected java.lang.String name,protected boolean temporary