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

com.javajy.api.service.GenericService Maven / Gradle / Ivy

The newest version!
package com.javajy.api.service;

import com.javajy.api.component.DBManager;
import com.javajy.api.entity.Database;
import com.javajy.api.entity.SuperBean;
import java.util.List;

public class GenericService extends Database {
    private Database e;

    public Integer save(SuperBean var1) {
        DBManager var2 = new DBManager(var1, this.e);
        return var2.save();
    }

    public Integer update(SuperBean var1) {
        DBManager var2 = new DBManager(var1, this.e);
        return var2.update();
    }

    public List queryByHQL(SuperBean var1) {
        DBManager var2 = new DBManager(var1, this.e);
        String var3 = "select * " + var1.getHql();
        return var2.query(var3);
    }

    public Database getDatabase() {
        return this.e;
    }

    public void setDatabase(Database var1) {
        this.e = var1;
    }

    public GenericService(String var1, String var2, String var3, String var4, String var5) {
        super(var1, var2, var3, var4, var5);
        this.setDatabase(new Database(var1, var2, var3, var4, var5));
    }

    public GenericService(String var1, String var2, String var3, String var4) {
        super(var1, var2, var3, var4);
        this.setDatabase(new Database(var1, var2, var3, var4));
    }

    public GenericService(String var1, String var2, String var3) {
        super(var1, var2, var3);
        this.setDatabase(new Database(var1, var2, var3));
    }
}