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

com.foreach.across.modules.adminweb.menu.EntityAdminMenu Maven / Gradle / Ivy

package com.foreach.across.modules.adminweb.menu;

import com.foreach.across.modules.web.menu.Menu;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.Assert;

public class EntityAdminMenu extends Menu
{
	private final Class entityClass;
	private final T entity;

	public EntityAdminMenu( Class entityClass ) {
		this( entityClass, null );
	}

	public EntityAdminMenu( Class entityClass, T entity ) {
		super( StringUtils.uncapitalize( entityClass.getSimpleName() ) + "EntityAdminMenu" );
		Assert.notNull( entityClass );

		this.entityClass = entityClass;
		this.entity = entity;
	}

	public Class getEntityType() {
		return entityClass;
	}

	public T getEntity() {
		return entity;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy