org.gvnix.addon.datatables.addon.QueryHolderTokens Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.gvnix.addon.datatables.addon Show documentation
Show all versions of org.gvnix.addon.datatables.addon Show documentation
Datatables support for Spring MVC based projects. Allows replace the standart roo list view to use JQuery Datatables component based on Dandelion datatables (http://dandelion.github.com/datatables) taglib
The newest version!
/*
* gvNIX is an open source tool for rapid application development (RAD).
* Copyright (C) 2010 Generalitat Valenciana
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see .
*/
package org.gvnix.addon.datatables.addon;
import java.util.Collections;
import java.util.List;
import org.springframework.roo.addon.finder.QueryHolder;
import org.springframework.roo.addon.finder.Token;
import org.springframework.roo.model.JavaSymbolName;
import org.springframework.roo.model.JavaType;
/**
* Class which replaces {@link QueryHolder} to make accessible
* {@link #getTokens()} method (needed to generate finders in ajax mode)
*
* @author DISID Corporation S.L. made for General Directorate for Information
* Technologies (DGTI)
* @see DatatablesMetadataProvider
*/
public class QueryHolderTokens {
private final String jpaQuery;
private final List parameterTypes;
private final List parameterNames;
private final List tokens;
public QueryHolderTokens(final String jpaQuery,
final List parameterTypes,
final List parameterNames, final List tokens) {
this.jpaQuery = jpaQuery;
this.parameterTypes = Collections.unmodifiableList(parameterTypes);
this.parameterNames = Collections.unmodifiableList(parameterNames);
this.tokens = Collections.unmodifiableList(tokens);
}
public List getTokens() {
return tokens;
}
public List getParameterTypes() {
return parameterTypes;
}
public List getParameterNames() {
return parameterNames;
}
}