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

org.flowable.content.engine.impl.cmd.GetTableNameCmd Maven / Gradle / Ivy

There is a newer version: 6.8.1
Show newest version
package org.flowable.content.engine.impl.cmd;

import java.io.Serializable;

import org.flowable.content.engine.impl.util.CommandContextUtil;
import org.flowable.engine.common.api.FlowableIllegalArgumentException;
import org.flowable.engine.common.impl.interceptor.Command;
import org.flowable.engine.common.impl.interceptor.CommandContext;

public class GetTableNameCmd implements Command, Serializable {

    private static final long serialVersionUID = 1L;

    private Class entityClass;

    public GetTableNameCmd(Class entityClass) {
        this.entityClass = entityClass;
    }

    public String execute(CommandContext commandContext) {
        if (entityClass == null) {
            throw new FlowableIllegalArgumentException("entityClass is null");
        }
        return CommandContextUtil.getTableDataManager(commandContext).getTableName(entityClass, true);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy