text:
package com.iluwatar.abstractdocument;

import org.junit.Test;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;

import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;

/**
 * AbstractDocument test class
 */
public class AbstractDocumentTest {

  private static final String KEY = "key";
  private static final String VALUE = "value";

  private class DocumentImplementation extends AbstractDocument {

    DocumentImplementation(Map<String, Object> properties) {
      super(properties);
    }
  }

  private DocumentImplementation document = new DocumentImplementation(new HashMap<>());

  @Test
  public void shouldPutAndGetValue() {
    document.put(KEY, VALUE);
    assertEquals(VALUE, document.get(KEY));
  }

  @Test
  public void shouldRetrieveChildren() {
    Map<String, Object> child1 = new HashMap<>();
    Map<String, Object> child2 = new HashMap<>();
    List<Map<String, Object>> children = Arrays.asList(child1, child2);

    document.put(KEY, children);

    Stream<DocumentImplementation> childrenStream = document.children(KEY, DocumentImplementation::new);
    assertNotNull(children);
    assertEquals(2, childrenStream.count());
  }

  @Test
  public void shouldRetrieveEmptyStreamForNonExistingChildren() {
    Stream<DocumentImplementation> children = document.children(KEY, DocumentImplementation::new);
    assertNotNull(children);
    assertEquals(0, children.count());
  }

  @Test
  public void shouldIncludePropsInToString() {
    Map<String, Object> props = new HashMap<>();
    props.put(KEY, VALUE);
    DocumentImplementation document = new DocumentImplementation(props);
    assertNotNull(document.toString().contains(KEY));
    assertNotNull(document.toString().contains(VALUE));
  }

}


text:
#ifndef MEDIAPIPE_CALCULATORS_CORE_MERGE_TO_VECTOR_CALCULATOR_H_
#define MEDIAPIPE_CALCULATORS_CORE_MERGE_TO_VECTOR_CALCULATOR_H_

#include <algorithm>
#include <memory>
#include <utility>
#include <vector>

#include "absl/status/status.h"
#include "mediapipe/framework/api2/node.h"
#include "mediapipe/framework/api2/port.h"
#include "mediapipe/framework/calculator_framework.h"

namespace mediapipe {
namespace api2 {

template <typename T>
class MergeToVectorCalculator : public Node {
 public:
  static constexpr typename Input<T>::Multiple kIn{""};
  static constexpr Output<std::vector<T>> kOut{""};

  MEDIAPIPE_NODE_CONTRACT(kIn, kOut);

  static absl::Status UpdateContract(CalculatorContract* cc) {
    RET_CHECK_GT(kIn(cc).Count(), 0) << "Needs at least one input stream";
    return absl::OkStatus();
  }

  absl::Status Process(CalculatorContext* cc) {
    const int input_num = kIn(cc).Count();
    std::vector<T> output_vector(input_num);
    std::transform(kIn(cc).begin(), kIn(cc).end(), output_vector.begin(),
                   [](const auto& elem) -> T { return elem.Get(); });
    kOut(cc).Send(output_vector);
    return absl::OkStatus();
  }
};

}  // namespace api2
}  // namespace mediapipe

#endif  // MEDIAPIPE_CALCULATORS_CORE_MERGE_TO_VECTOR_CALCULATOR_H_

redpajama_set_name: RedPajamaGithub


text:
package io.hawkcd.materials.materialservices;

import io.hawkcd.model.GitMaterial;

public interface IGitService {
    boolean repositoryExists(GitMaterial gitMaterial);

    GitMaterial cloneRepository(GitMaterial gitMaterial);

    GitMaterial fetchLatestCommit(GitMaterial gitMaterial);
}


text:
from django.conf.urls import patterns, url
from .views import monster_index, monster_list_by_rulebook, monsters_in_rulebook, monster_detail

app_name = 'monsters'
urlpatterns = [
    # monsters
    url(r'^$', monster_index, name='monster_index'),

    # monsters > by rulebooks
    url(r'^by-rulebooks/$', monster_list_by_rulebook, name='monster_list_by_rulebook'),

    # monsters > rulebook
    url(r'^(?P<rulebook_slug>[^/]+)--(?P<rulebook_id>\d+)/$',
        monsters_in_rulebook, name='monsters_in_rulebook'),

    # monsters > rulebook > monster
    url(r'^(?P<rulebook_slug>[^/]+)--(?P<rulebook_id>\d+)/(?P<monster_slug>[^/]+)--(?P<monster_id>\d+)/$',
        monster_detail, name='monster_detail')
]


text:
package apple.metrickit;

import apple.NSObject;
import apple.foundation.NSArray;
import apple.foundation.NSCoder;
import apple.foundation.NSMeasurement;
import apple.foundation.NSMethodSignature;
import apple.foundation.NSSet;
import apple.foundation.NSUnitDuration;
import org.moe.natj.c.ann.FunctionPtr;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.Library;
import org.moe.natj.general.ann.Mapped;
import org.moe.natj.general.ann.NInt;
import org.moe.natj.general.ann.NUInt;
import org.moe.natj.general.ann.Owned;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.general.ptr.VoidPtr;
import org.moe.natj.objc.Class;
import org.moe.natj.objc.ObjCRuntime;
import org.moe.natj.objc.SEL;
import org.moe.natj.objc.ann.ObjCClassBinding;
import org.moe.natj.objc.ann.ProtocolClassMethod;
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.map.ObjCObjectMapper;

/**
 * MXHangDiagnostic
 *

 * An MXDiagnostic subclass that encapsulates hang diagnostic reports.
 *

 * Applications are considered to be "hanging" when they are unable to handle user input responsively.
 *

 * This generally occurs when your applications main thread is blocked.
 */
@Generated
@Library("MetricKit")
@Runtime(ObjCRuntime.class)
@ObjCClassBinding
public class MXHangDiagnostic extends MXDiagnostic {
    static {
        NatJ.register();
    }

    @Generated
    protected MXHangDiagnostic(Pointer peer) {
        super(peer);
    }

    @Generated
    @Selector("accessInstanceVariablesDirectly")
    public static native boolean accessInstanceVariablesDirectly();

    @Generated
    @Owned
    @Selector("alloc")
    public static native MXHangDiagnostic alloc();

    @Owned
    @Generated
    @Selector("allocWithZone:")
    public static native MXHangDiagnostic allocWithZone(VoidPtr zone);

    @Generated
    @Selector("automaticallyNotifiesObserversForKey:")
    public static native boolean automaticallyNotifiesObserversForKey(String key);

    /**
     * [@property] callStackTree
     *

     * The application call stack tree associated with the hang.
     */
    @Generated
    @Selector("callStackTree")
    public native MXCallStackTree callStackTree();

    @Generated
    @Selector("cancelPreviousPerformRequestsWithTarget:")
    public static native void cancelPreviousPerformRequestsWithTarget(@Mapped(ObjCObjectMapper.class) Object aTarget);

    @Generated
    @Selector("cancelPreviousPerformRequestsWithTarget:selector:object:")
    public static native void cancelPreviousPerformRequestsWithTargetSelectorObject(
            @Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector,
            @Mapped(ObjCObjectMapper.class) Object anArgument);

    @Generated
    @Selector("classFallbacksForKeyedArchiver")
    public static native NSArray<String> classFallbacksForKeyedArchiver();

    @Generated
    @Selector("classForKeyedUnarchiver")
    public static native Class classForKeyedUnarchiver();

    @Generated
    @Selector("debugDescription")
    public static native String debugDescription_static();

    @Generated
    @Selector("description")
    public static native String description_static();

    /**
     * [@property] hangDuration
     *

     * Total hang duration for this diagnostic.
     *

     * Dimensioned as NSUnitDuration.
     */
    @Generated
    @Selector("hangDuration")
    public native NSMeasurement<NSUnitDuration> hangDuration();

    @Generated
    @Selector("hash")
    @NUInt
    public static native long hash_static();

    @Generated
    @Selector("init")
    public native MXHangDiagnostic init();

    @Generated
    @Selector("initWithCoder:")
    public native MXHangDiagnostic initWithCoder(NSCoder coder);

    @Generated
    @Selector("instanceMethodForSelector:")
    @FunctionPtr(name = "call_instanceMethodForSelector_ret")
    public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(SEL aSelector);

    @Generated
    @Selector("instanceMethodSignatureForSelector:")
    public static native NSMethodSignature instanceMethodSignatureForSelector(SEL aSelector);

    @Generated
    @Selector("instancesRespondToSelector:")
    public static native boolean instancesRespondToSelector(SEL aSelector);

    @Generated
    @Selector("isSubclassOfClass:")
    public static native boolean isSubclassOfClass(Class aClass);

    @Generated
    @Selector("keyPathsForValuesAffectingValueForKey:")
    public static native NSSet<String> keyPathsForValuesAffectingValueForKey(String key);

    @Generated
    @Owned
    @Selector("new")
    public static native MXHangDiagnostic new_objc();

    @Generated
    @Selector("resolveClassMethod:")
    public static native boolean resolveClassMethod(SEL sel);

    @Generated
    @Selector("resolveInstanceMethod:")
    public static native boolean resolveInstanceMethod(SEL sel);

    @Generated
    @Selector("setVersion:")
    public static native void setVersion_static(@NInt long aVersion);

    @Generated
    @Selector("superclass")
    public static native Class superclass_static();

    @Generated
    @Selector("supportsSecureCoding")
    public static native boolean supportsSecureCoding();

    @Generated
    @ProtocolClassMethod("supportsSecureCoding")
    public boolean _supportsSecureCoding() {
        return supportsSecureCoding();
    }

    @Generated
    @Selector("version")
    @NInt
    public static native long version_static();
}


text:
<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
            new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
            new DEPI\PortadaBundle\PortadaBundle(),
            new DEPI\InvestigadoresBundle\InvestigadoresBundle(),
            new DEPI\AlumnosBundle\AlumnosBundle(),
            new DEPI\ProyectosBundle\ProyectosBundle(),
            new DEPI\LineasInvestigacionBundle\LineasInvestigacionBundle(),
            new DEPI\AlumnosProyectosBundle\AlumnosProyectosBundle(),
            new DEPI\InvestigadoresLineasBundle\InvestigadoresLineasBundle(),
            new DEPI\AreasBundle\AreasBundle(),
            new DEPI\AreasProyectosBundle\AreasProyectosBundle(),
            new DEPI\ProductosAcademicosBundle\ProductosAcademicosBundle(),
            new DEPI\ProyectosProductosBundle\ProyectosProductosBundle(),
            new DEPI\InvestigadorProyectoBundle\InvestigadorProyectoBundle(),
            new DEPI\BackEndBundle\BackEndBundle(),
            new DEPI\NoticiasBundle\NoticiasBundle(),
            new DEPI\PosgradosBundle\PosgradosBundle(),
            new DEPI\PosgradoAlumnosBundle\PosgradoAlumnosBundle(),
            new DEPI\PosgradoAreasBundle\PosgradoAreasBundle(),
            new DEPI\PosgradoLineasBundle\PosgradoLineasBundle(),
            new DEPI\PosgradoInvestigadoresBundle\PosgradoInvestigadoresBundle(),
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
        }

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}


text:
Some updates for the club fair:

    The club list now shows a random selection of club videos (but only those
    that are on YouTube).

    Clubs added to your list now have a Join link in the schedule so you can
    quickly join the provided Zoom meeting link.

Fixed the "Add to my clubs" button not showing.

  The club list will be updated regularly maybe until they rectify the spelling
  of the "Competative Programming Club."


text:
package model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by Willow on 12/29/16.
 */
@Entity
@Table(name = "reply")
public class Reply extends BaseModel {
    @Id
    private int id;
    @Column(name = "comment_id")
    private int commentId;
    @Column(name = "from_uid")
    private int fromUId;
    @Column(name = "to_uid")
    private int toUId;
    private String Content;
    private Date time;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCommentId() {
        return commentId;
    }

    public void setCommentId(int commentId) {
        this.commentId = commentId;
    }

    public int getFromUId() {
        return fromUId;
    }

    public void setFromUId(int fromUId) {
        this.fromUId = fromUId;
    }

    public int getToUId() {
        return toUId;
    }

    public void setToUId(int toUId) {
        this.toUId = toUId;
    }

    public String getContent() {
        return Content;
    }

    public void setContent(String content) {
        Content = content;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }
}


text:
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models
import re

class Migration(migrations.Migration):

    dependencies = [
        ('measure_mate', '0042_make_attribute_field_unique'),
    ]

    operations = [
        migrations.AlterField(
            model_name='tag',
            name='name',
            field=models.SlugField(unique=True, validators=[django.core.validators.RegexValidator(code='invalid', message="Enter a valid 'slug' consisting of lowercase letters, numbers, underscores or hyphens; starting and ending with letters or numbers.", regex=re.compile('^[a-z0-9][a-z0-9_-]*[a-z0-9]$', 32))]),
        ),
    ]


text:
"""Script to calculate mean wind direction from ensemble realizations."""

from improver import cli

@cli.clizefy
@cli.with_output
def process(wind_direction: cli.inputcube, *, backup_method="neighbourhood"):
    """Calculates mean wind direction from ensemble realization.

    Create a cube containing the wind direction averaged over the ensemble
    realizations.

    Args:
        wind_direction (iris.cube.Cube):
            Cube containing the wind direction from multiple ensemble
            realizations.
        backup_method (str):
            Backup method to use if the complex numbers approach has low
            confidence.
            "neighbourhood" (default) recalculates using the complex numbers
            approach with additional realization extracted from neighbouring
            grid points from all available realizations.
            "first_realization" uses the value of realization zero, and should
            only be used with global lat-lon data.

    Returns:
        iris.cube.Cube:
            Cube containing the wind direction averaged from the ensemble
            realizations.
    """
    from improver.wind_calculations.wind_direction import WindDirection

    result = WindDirection(backup_method=backup_method)(wind_direction)
    return result


text:
import Event from './event'

function observeRemove(api, store) {
    api.on('remove', event => {
        if (!event.cancelled) {
            const idOrIds = event.result || event.payload
            removeEntries({
                ids: [].concat(idOrIds),
                api,
                store
            })
        }
    })
}

function removeEntries({ids, api, store}) {
    ids.forEach(id => store.removeEntry(id))

    api.fire(new Event({
        informational: true,
        payload: ids,
        type: 'removed'
    }))
}

export default observeRemove


text:
import proto  # type: ignore

from google.cloud.aiplatform_v1.types import artifact
from google.cloud.aiplatform_v1.types import event
from google.cloud.aiplatform_v1.types import execution

__protobuf__ = proto.module(
    package="google.cloud.aiplatform.v1",
    manifest={
        "LineageSubgraph",
    },
)

class LineageSubgraph(proto.Message):
    r"""A subgraph of the overall lineage graph. Event edges connect
    Artifact and Execution nodes.

    Attributes:
        artifacts (Sequence[google.cloud.aiplatform_v1.types.Artifact]):
            The Artifact nodes in the subgraph.
        executions (Sequence[google.cloud.aiplatform_v1.types.Execution]):
            The Execution nodes in the subgraph.
        events (Sequence[google.cloud.aiplatform_v1.types.Event]):
            The Event edges between Artifacts and
            Executions in the subgraph.
    """

    artifacts = proto.RepeatedField(
        proto.MESSAGE,
        number=1,
        message=artifact.Artifact,
    )
    executions = proto.RepeatedField(
        proto.MESSAGE,
        number=2,
        message=execution.Execution,
    )
    events = proto.RepeatedField(
        proto.MESSAGE,
        number=3,
        message=event.Event,
    )

__all__ = tuple(sorted(__protobuf__.manifest))


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.xeneo.db;

import org.xeneo.core.security.User;
import org.xeneo.core.task.Task;
import org.xeneo.db.services.URIGenerator;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 *
 * @author Stefan Huber
 */
public class JdbcTask implements Task {

    private static String TASK_ATTRIBUTES_UPDATE = "update `Task` set Title = ?, Description = ? where TaskURI = ?";
    private static String TASK_ATTRIBUTES_QUERY = "select * from `Task` where TaskURI = ?";
    private static String CREATE_NEW_TASK = "insert into `Task` (TaskURI,Title,Description) values (?,?,?)";

    private String taskURI;
    private String title;
    private String description;
    private boolean updateMe = true;

    private JdbcTemplate jdbcTemplate;

    public JdbcTask(JdbcTemplate jdbcTemplate, String taskURI) {
        this.jdbcTemplate = jdbcTemplate;
        this.taskURI = taskURI;
        this.updateMe = true;
    }

    public JdbcTask(JdbcTemplate jdbcTemplate, String title, String description) {
        this.jdbcTemplate = jdbcTemplate;
        this.title = title;
        this.description = description;

        createTask();

        updateMe = false;
    }

    private void createTask() {
        if (taskURI == null) {
            taskURI = URIGenerator.getInstance().generateURI("task");
            jdbcTemplate.update(CREATE_NEW_TASK, taskURI, title, description);
        }
    }

    private void updateMe() {
        Map<String, Object> map = jdbcTemplate.queryForMap(TASK_ATTRIBUTES_QUERY, this.taskURI);
        if (!map.isEmpty()) {
            this.title = map.containsKey("Title") ? (String) map.get("Title") : "";
            this.description = map.containsKey("Description") ? (String) map.get("Description") : "";
        }

        updateMe = false;
    }

    public String getTaskURI() {
        return taskURI;
    }

    public String getTitle() {
        if (updateMe) {
            updateMe();
        }
        return title;
    }

    public String getDescription() {
        if (updateMe) {
            updateMe();
        }
        return description;
    }

    public List<User> getParticipants() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void update(String title, String description) {
        this.title = title;
        this.description = description;
        jdbcTemplate.update(TASK_ATTRIBUTES_UPDATE, title, description, taskURI);
        updateMe = false;
    }
}


text:
ZUserInputEvent::ZUserInputEvent()
{
}


text:
module BackgroundQueue::Worker
  #a way of notifying worker progress
  class Progress

    attr_reader :registered_tasks

    def initialize(callback_object)
      if callback_object.kind_of?(BackgroundQueue::Worker::Base)
        @worker = callback_object
      elsif callback_object.kind_of?(Proc)
        @callback = callback_object
      else
        @callback_object = callback_object
      end

      @main_caption = nil
      @sub_caption = nil

      @finished_sub_progress = 0
      @current_sub_progress_size = 0
      @current_sub_progress = 0
      @sub_task_step_size = 0
    end

    def start(main_caption=nil)
      @main_caption = main_caption

      @sub_caption = nil

      @finished_sub_progress = 0
      @current_sub_progress_size = 0
      @current_sub_progress = 0

      update_callback
    end

    def set_main_caption(caption)
      @main_caption = caption
      update_callback
    end

    def finish(main_caption = nil)
      @main_caption = main_caption unless main_caption.nil?
      @sub_caption = nil unless main_caption.nil?
      @current_sub_progress = 0
      @finished_sub_progress = 100
      update_callback
    end

    def register_task(key, units)
      @registered_tasks ||= {}
      @registered_task_total ||= 0
      @registered_tasks[key] = units
      @registered_task_total += units
    end

    def start_task(key, caption=nil)
      if @current_sub_progress_size != 0
        @finished_sub_progress += @current_sub_progress_size
        @current_sub_progress_size = 0
      end
      @current_sub_progress_size = get_task_size(key)
      @current_sub_progress = 0.0
      @sub_task_step_size = 0
      @sub_caption = caption
      update_callback
    end

    def get_task_size(key)
      raise "No registered sub task (#{key})" if @registered_tasks[key].nil?
      @registered_tasks[key].to_f / @registered_task_total * 100.0
    end

    def set_task_steps(step_count)
      if step_count == 0
        @sub_task_step_size = 100
      else
        @sub_task_step_size = 100.0 / step_count.to_f * 100.0
      end
    end

    def inc
      @current_sub_progress += @sub_task_step_size
      update_callback
    end

    def set_task_progress(percent)
      @current_sub_progress += percent
      @current_sub_progress = 100 if @current_sub_progress > 100
      update_callback
    end

    def set_task_caption(caption)
      @sub_caption = caption
      update_callback
    end

    def add_note(notice)
      update_callback_meta(:notice, notice)
    end

    def add_warning(warning)
      update_callback_meta(:warning, warning)
    end

    def add_error(error)
      update_callback_meta(:error, error)
    end

    def set_meta_data(key, data)
      update_callback_meta(:meta, {key=>data})
    end

    def get_caption
      if @main_caption && @sub_caption
        "#{@main_caption}: #{@sub_caption }"
      elsif @main_caption
        @main_caption
      elsif @sub_caption
        @sub_caption
      else
        ""
      end
    end

    def get_percent
      @finished_sub_progress + (@current_sub_progress_size  / 100.0 * @current_sub_progress / 100.0)
    end

    def update_callback
      if @worker
        @worker.set_progress(get_caption, get_percent)
      elsif @callback
        @callback.call(:progress, get_caption, get_percent)
      elsif @callback_object
        @callback_object.set_progress(get_caption, get_percent, self)
      end
    end

    def update_callback_meta(key, value)
      if @worker
        @worker.add_progress_meta(key, value)
      elsif @callback
        @callback.call(:meta, key, value)
      elsif @callback_object
        @callback_object.add_progress_meta(key, value, self)
      end
    end

  end
end


text:
<?php
/**
 * [PHPFOX_HEADER]
 */

defined('PHPFOX') or exit('NO DICE!');

/**
 *
 *
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Raymond_Benc
 * @package 		Phpfox_Component
 * @version 		$Id: frame.class.php 2096 2010-11-09 10:35:56Z Raymond_Benc $
 */
class Facebook_Component_Controller_Frame extends Phpfox_Component
{
	/**
	 * Class process method wnich is used to execute this component.
	 */
	public function process()
	{
		header('Location: https://graph.facebook.com/oauth/authorize?client_id=' . Phpfox::getParam('facebook.facebook_app_id') . '&redirect_uri=' . Phpfox::getParam('core.path') . 'index.php?facebook-process-login=true&scope=publish_stream,email,user_birthday');
	}

	/**
	 * Garbage collector. Is executed after this class has completed
	 * its job and the template has also been displayed.
	 */
	public function clean()
	{
		(($sPlugin = Phpfox_Plugin::get('facebook.component_controller_frame_clean')) ? eval($sPlugin) : false);
	}
}

?>


text:
// 中断流标签子类相关
!function(TerminatedFlowTag){

this.ReturnTag = function(SCOPE_CLOSURE, visitor){
	/**
	 * return 关键字标签
	 * @param {Number} _type - 标签类型
	 */
	function ReturnTag(_type){
		TerminatedFlowTag.call(this, _type);
	};
	ReturnTag = new Rexjs(ReturnTag, TerminatedFlowTag);

	ReturnTag.props({
		$class: CLASS_STATEMENT_BEGIN,
		flow: ECMAScriptStatement.FLOW_LINEAR,
		regexp: /return/,
		/**
		 * 获取此标签接下来所需匹配的标签列表
		 * @param {TagsMap} tagsMap - 标签集合映射
		 */
		require: function(tagsMap){
			return tagsMap.returnContextTags;
		},
		/**
		 * 标签访问器
		 * @param {SyntaxParser} parser - 语法解析器
		 * @param {Context} context - 标签上下文
		 * @param {Statement} statement - 当前语句
		 * @param {Statements} statements - 当前语句块
		 */
		visitor: function(parser, context, statement, statements){
			// 如果存在闭包
			if(statements.closure){
				// 调用父类访问器
				visitor.call(this, parser, context, statement, statements);

				// 设置当前表达式为空表达式
				statements.statement.expression = new EmptyExpression(null);
				return;
			}

			// 报错
			parser.error(
				context,
				ECMAScriptErrors.template("ILLEGAL_STATEMENT", context.content)
			);
		}
	});

	return ReturnTag;
}(
	this.ECMAScriptStatements.SCOPE_CLOSURE,
	TerminatedFlowTag.prototype.visitor
);

}.call(
	this,
	this.TerminatedFlowTag,
	this.ECMAScriptStatements
);


text:
import {
  selectDock,
  selectSettings,
  selectView,
  selectIntro,

  selectWeatherError,
  selectWeatherLoading,
  selectWeatherData,

  selectWeatherForecast,
  selectLocation,

  selectLocationName
} from '../index';

describe('selectors', () => {
  describe('selectDock', () => {
    it('should return .dock portion of the state', () => {
      expect(selectDock({dock: 'test'})).toBe('test');
    });
  });

  describe('selectSettings', () => {
    it('should return .settings portion of the state', () => {
      expect(selectSettings({settings: 'test'})).toBe('test');
    });
  });

  describe('selectView', () => {
    it('should return .view portion of the state', () => {
      expect(selectView({view: 'test'})).toBe('test');
    });
  });

  describe('selectIntro', () => {
    it('should return .intro portion of the state', () => {
      expect(selectIntro({intro: 'test'})).toBe('test');
    });
  });

  describe('selectLocationName', () => {
    it('should return customLocation is useLocation is "custom"', () => {
      expect(selectLocationName({
        settings: {
          useLocation: 'custom',
          customLocation: 'test'
        }
      })).toBe('test');
    });

    test(
      'should return "auto" is useLocation is "custom" but customLocation is not set',
      () => {
        expect(selectLocationName({
          settings: {
            useLocation: 'custom',
            customLocation: ''
          }
        })).toBe('auto');
      }
    );

    it('should return "auto" is useLocation is not "custom"', () => {
      expect(selectLocationName({
        settings: {
          useLocation: 'test',
          customLocation: ''
        }
      })).toBe('auto');
    });
  });

  describe('selectWeatherData', () => {
    it('should return data for specific location', () => {
      expect(selectWeatherData({
        settings: {useLocation: 'auto'},
        weather: {
          auto: 'test'
        }
      })).toBe('test');
    });

    it('should return null when there is no data', () => {
      expect(selectWeatherData({
        settings: {useLocation: 'auto'},
        weather: {
          auto: ''
        }
      })).toEqual(null);
    });
  });

  describe('selectWeatherError', () => {
    it('should return .error prop of the weather portion', () => {
      expect(selectWeatherError({
        settings: {useLocation: 'auto'},
        weather: {
          auto: {
            error: 'test'
          }
        }
      })).toBe('test');
    });
  });

  describe('selectWeatherLoading', () => {
    it('should return .loading prop of the weather portion', () => {
      expect(selectWeatherLoading({
        settings: {useLocation: 'auto'},
        weather: {
          auto: {
            loading: 'test'
          }
        }
      })).toBe('test');
    });
  });

  describe('selectLocation', () => {
    it('should return city info from weather data for specific location', () => {
      expect(selectLocation({
        settings: {useLocation: 'auto'},
        weather: {
          auto: {
            data: {
              location: {
                city: 'test_name'
              }
            }
          }
        }
      })).toEqual({
        city: 'test_name'
      });
    });

    it('should null if no weather data', () => {
      expect(selectLocation({
        settings: {useLocation: 'auto'},
        weather: {
          auto: null
        }
      })).toBe(null);
    });
  });

  describe('selectWeatherForecast', () => {
    it('should return null if no weather data available', () => {
      expect(selectWeatherForecast({
        settings: {useLocation: 'auto'},
        weather: {
          auto: null
        }
      })).toBe(null);
    });

    it('should accumulate weather data for specific location', () => {
      expect(selectWeatherForecast({
        settings: {useLocation: 'auto', temperatureUnits: 'c'},
        weather: {
          auto: {
            data: {
              forecast: [{
                code: '1',
                date: '1 Jan 2000',
                day: 'Wed',
                max: 1,
                min: 10,
                text: 'test1'
              }, {
                code: '2',
                date: '12 Jan 2000',
                day: 'Thu',
                max: 2,
                min: 20,
                text: 'test2'
              }]
            }
          }
        }
      })).toEqual([{
        code: '1',
        date: '1 Jan 2000',
        day: 'Wed',
        max: 1,
        min: 10,
        text: 'test1'
      }, {
        code: '2',
        date: '12 Jan 2000',
        day: 'Thu',
        max: 2,
        min: 20,
        text: 'test2'
      }]);
    });
  });
});


text:
from . import uid, gid, user_name, group_name, user_home
# (if you like, you can remove the line without any effect)
#
# The order of config files is (if existing):
# - package defaults
# - /etc/userdocker/config.py
# - /etc/userdocker/group/config_<prio>_<group_name>.py (see note below)
# - /etc/userdocker/gid/config_<prio>_<gid>.py (see note below)
# - /etc/userdocker/user/config_<user_name>.py
# - /etc/userdocker/uid/config_<uid>.py
#
# All config files are executed in place, allowing later config files to
# override or modify previous ones. The above might sound complicated, but just
# start with a /etc/userdocker/config.py and then define exceptions later.
#
# As a user can be in several groups, the group configs include a 2 digit prio.
# On execution, we will get all groups for the user, collect the corresponding
# config files matching those groups if they exist and load all collected
# config files sorted ascending by prio. Lowest prio is 00 (loaded first),
# highest prio is 99 (loaded last).
# Afterwards the same is done for gid config files.
#
# Example: if a user is in groups "adm" and "udocker" and an admin created the
# config files config_99_adm.py and config_50_udocker.py, then the execution
# order is:
# - package defaults
# - /etc/userdocker/config.py
# - /etc/userdocker/group/config_50_udocker.py
# - /etc/userdocker/group/config_99_adm.py
# - ...
# This means that config_99_adm.py can grant users in group adm a lot more
# permissions (reliably), even if they are also in the udocker group.
################################################################################

# Admin default value for userdocker log level:
# ['DEBUG', 'INFO', 'WARNING', 'ERROR']
LOGLVL = 'INFO'

# Available executors for users.
EXECUTORS = {
    'docker': '/usr/bin/docker',
    'nvidia-docker': '/usr/bin/nvidia-docker',
}
EXECUTOR_DEFAULT = 'docker'

# The following allows you to specify which docker top level commands a user can
# run at all (still restricted by the following settings):
ALLOWED_SUBCOMMANDS = [
    'attach',  # allows users to re-attach to _their_ containers
    'dockviz',  # tree visualization of images
    'images',
    'load',  # see RUN_PULL as well
    'ps',
    'pull',  # see RUN_PULL as well
    'run',
    'version',
]

# Arguments that you want to enforce on the user:
# Do not include args that are handled below (e.g. run -v, -p, --cap-drop)!
# The following arguments will always be injected for the corresponding command:
ARGS_ALWAYS = {
    'run': [
        # '-t',
        # '-i',
        '--rm',
        # '--shm-size=1g',
    ],
}

# The following arguments are available to the user for the
# given command.
# Do not include args that are handled below (e.g. run -v, -p, --cap-drop)!
# Aliases are supported as tuples/lists below, but not in ARGS_ALWAYS.
# Simple string args can contain assignments (e.g., '--arg=val'). The user can
# then use --arg=val.
ARGS_AVAILABLE = {
    'attach': [
        '--no-stdin',
    ],
    'images': [
        ('-a', '--all'),
        '--digests',
        '--no-trunc',
        ('-q', '--quiet'),
    ],
    'load': [
        ('-q', '--quiet'),
    ],
    'ps': [
        ('-a', '--all'),
        ('-l', '--latest'),
        ('-s', '--size'),
        ('-q', '--quiet'),
        '--no-trunc',
    ],
    'pull': [
        ('-a', '--all-tags'),
    ],
    'run': [
        ('-t', '--tty'),
        ('-i', '--interactive'),
        '--read-only',
        # users can map all exposed container ports to random free host ports:
        ('-P', '--publish-all'),
        # '--shm-size=16g',  # allows users to set shared mem size
    ],
}

# Volume mounts:
# - VOLUME_MOUNTS_ALWAYS will be mounted whether the user wants it or not
# - VOLUME_MOUNTS_AVAILABLE will only be mounted if the user explicitly
#   specifies them
# - VOLUME_MOUNTS_DEFAULT will be added unless the user specifies the
#   --no-default-mounts option
# - The user can mount any of the above explicitly with "-v", redundancy is ok
# - You (admin) can specify whatever usually comes after the "-v" arg in
#   "host_path:container_path[:flags]" form. If container_path is empty, the
#   user may select one. If you don't specify a flag, the user can append a
#   "ro" to guard herself (for any allowed mount).
# Example:
# VOLUME_MOUNTS_AVAILABLE = ['/scratch:/scratch', '/data:/input:ro', '/foo:']
VOLUME_MOUNTS_ALWAYS = []
VOLUME_MOUNTS_AVAILABLE = []
VOLUME_MOUNTS_DEFAULT = [
    # Mount /etc/{passwd,groups} for correct uid,gid display in containers.
    # Not enabling this has mostly cosmetic effects. All mappings to the host
    # file system are via uid:gid.
    # WARNING: not enabled by default, as systems using ldap usually do not
    # offer the necessary information in these files, but via getent.
    # '/etc/passwd:/etc/passwd:ro',
    # '/etc/group:/etc/group:ro',

    # default mount user's home
    user_home + ':' + user_home,
]

# This setting issues a listdir for used host dirs in mounts.
# Useful for server-side auto-mounts.
PROBE_USED_MOUNTS = True

# User is allowed to run an image if any of the following regexps match it
ALLOWED_IMAGE_REGEXPS = [
    '^[A-Za-z_].*',
]

# Normally docker run automatically pulls images that aren't available locally.
# This possible values here are ['default', 'never', 'always']
# 'never' will restrict to locally available images (see ALLOWED_COMMANDS and
# restrict load command if desired!).
RUN_PULL = 'default'

# If set, the user will run with his uid and gid in the container.
# Changing this to false is probably a really bad idea, especially when combined
# with any mounts.
USER_IN_CONTAINER = True

# The following allows to drop / grant capabilities of all containers.
# By default we drop all
CAPS_DROP = ['ALL']
CAPS_ADD = []

# User ability to map ports explicitly:
# Unlike the probably safe `-P` run arg (which maps all exposed container ports
# to random free host ports (world accessible)), giving users explicit control
# over port mappings is probably not the best idea, as they are likely to
# collide on frequently used ports such as 5000 or 8080.
# Also it might unintentionally allow them to bind ports in the root range if
# you are not careful.
# For flexibility, we allow you to specify regexps that each -p arg is matched
# against one by one. Only if each of the user's -p args matches at least one of
# these, the docker run command is executed. If the list is empty, the -p
# argument is neither allowed nor shown to the user.
ALLOWED_PORT_MAPPINGS = [
    # useful defaults: most similar to -P, but allows users to select
    # ports instead of mapping all exposed publicly. Also might allow them to
    # bind them local to host only:
    r'^127\.0\.0\.1::[0-9]+$',  # local access from host (via random free port)
    '^[0-9]+$',  # public access (via random free host port)

    # more examples:

    # allow `-p 127.0.0.1:5000-6000:80`, so user can map container 80 to
    # random host port in range of 5000-6000 that is only accessible from host:
    # r'^127\.0\.0\.1:5000-6000:80$'

    # allow `-p 8080:80`, so user can map container 80 to host 8080 (if free):
    # '^8080:80$'  # probably useful in user-specific configs

    # allow all (probably bad idea!):
    # '^.*$',  # allows all, probably bad idea!
]

# Environment vars to set for the container:
ENV_VARS = [
    # sets HOME env var to user's home
    'HOME=' + user_home,
]
ENV_VARS_EXT = {
    'nvidia-docker': [
        'NCCL_TOPOLOGY=CUBEMESH',
    ]
}

# nvidia docker specific settings
# The following settings allow to restrict the way users can use nvidia GPUs
# in their container.
# - NV_ALLOWED_GPUS allows you to only make a subset of GPUs available to users.
#   Setting this to [] or None will result in nvidia-docker to always fail as no
#   GPUs are available. If that's desired, you should instead remove the
#   nvidia-docker executor above, as that's less confusing for users!
# - NV_DEFAULT_GPU_COUNT_RESERVATION allows to specify how many GPUs are passed
#   to a container if the user does not specify the NV_GPU env var. This is
#   different from the nvidia-docker defaults, which would by default allow
#   access to all GPUs!
# - NV_MAX_GPU_COUNT_RESERVATION allows you to limit the amount of GPUs made
#   available to a single container. Setting this to -1 means no limit.
# - GPUs on which more than NV_GPU_UNAVAILABLE_ABOVE_MEMORY_USED MB of memory is
#   used will be marked as unavailable. This setting is userdocker independent.
#   Setting this to -1 results in GPUs always being regarded as available.
# - If NV_EXCLUSIVE_GPU_RESERVATION is set, any GPUs already used in any other
#   container are regarded as unavailable for this container.
# - NV_ALLOW_OWN_GPU_REUSE allows users to run multiple containers on GPUs they
#   already use. This only happens when explicitly setting NV_GPU.
NVIDIA_SMI = '/usr/bin/nvidia-smi'  # path to nvidia-smi
NV_ALLOWED_GPUS = 'ALL'  # otherwise a list like [1, 3]. [] for none.
NV_DEFAULT_GPU_COUNT_RESERVATION = 1
NV_MAX_GPU_COUNT_RESERVATION = -1
NV_GPU_UNAVAILABLE_ABOVE_MEMORY_USED = 0
NV_EXCLUSIVE_CONTAINER_GPU_RESERVATION = True
NV_ALLOW_OWN_GPU_REUSE = True


text:
package com.frameworkset.common.poolman;

import com.frameworkset.common.poolman.handle.FieldRowHandler;
import com.frameworkset.common.poolman.handle.NullRowHandler;
import com.frameworkset.common.poolman.handle.RowHandler;
import com.frameworkset.common.poolman.util.DBOptions;
import com.frameworkset.util.ListInfo;

import java.sql.SQLException;
import java.util.List;

/**
 *
Title: SQLExecutor.java

 *
Description:

 *
bboss workgroup

 *
Copyright (c) 2008

 * @Date 2010-3-11 下午01:46:25
 * @author biaoping.yin
 * @version 1.0
 */
public class SQLExecutor extends DBOPtionsSQLExecutor
{

	//    protected String dbname;

	public Object execute() throws SQLException
    {
    	return execute((DBOptions)null);

    }

	//	public static void init(SQLParams sqlparams,String statement,String pretoken,String endtoken,String action)
//	{
////		this.sqlparams = new SQLParams();
//		sqlparams.setOldsql( statement);
//		if(action != null)
//		{
//			if(action.equals(ACTION_INSERT))
//				sqlparams.setAction(PreparedDBUtil.INSERT);
//			else if(action.equals(ACTION_DELETE))
//				sqlparams.setAction(PreparedDBUtil.DELETE);
//			else if(action.equals(ACTION_UPDATE))
//				sqlparams.setAction(PreparedDBUtil.UPDATE);
//		}
//		sqlparams.setPretoken(pretoken);
//		sqlparams.setEndtoken(endtoken);
//		//http://changsha.koubei.com/store/detail--storeId-b227fc4aee6e4862909ea7bf62556a7a
//
//
//	}

	public static void insertBeans(String dbname, String sql, List beans) throws SQLException {

				insertBeans((DBOptions) null, dbname,   sql,   beans);
	}

	public static void insertBeans(String dbname, String sql, List beans,GetCUDResult getCUDResult) throws SQLException {

				insertBeans((DBOptions) null, dbname,   sql,   beans,  getCUDResult);
	}

	public static Object update( String sql, Object... fields) throws SQLException {
//		return execute(null, sql,PreparedDBUtil.UPDATE, fields);

				return update( (DBOptions) null, sql, fields) ;
	}

	public static Object delete(String sql, Object... fields) throws SQLException {
//		return execute(null, sql,PreparedDBUtil.DELETE, fields);
		return delete((DBOptions) null, sql,fields);

	}

//	public static void deleteByKeys(String sql, Object... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);
//
//	}
//	public static void deleteByKeysWithDBName(String dbname,String sql, Object... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);
//
//	}

	public static void deleteByKeys(String sql, int... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);

				deleteByKeys((DBOptions) null, sql, fields);

	}
	public static void deleteByKeysWithDBName(String dbname,String sql, int... fields) throws SQLException {
//		executeBatch(dbname, sql,PreparedDBUtil.DELETE, fields);

				deleteByKeysWithDBName((DBOptions) null, dbname,  sql,   fields);

	}

	public static void deleteByLongKeys(String sql, long... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);

				deleteByLongKeys((DBOptions) null, sql,  fields) ;

	}
	public static void deleteByLongKeysWithDBName(String dbname,String sql, long... fields) throws SQLException {
//		executeBatch(dbname, sql,PreparedDBUtil.DELETE, fields);

				deleteByLongKeysWithDBName((DBOptions) null, dbname,  sql,  fields);

	}

	public static <T> void executeBatch(String sql,List<T> datas,int batchsize, BatchHandler<T> batchHandler) throws SQLException{

				executeBatch((DBOptions) null, sql, datas,  batchsize,  batchHandler) ;
	}

	public static <T> void executeBatch(String dbname,String sql,List<T> datas,int batchsize, BatchHandler<T> batchHandler) throws SQLException{

				executeBatch((DBOptions) null, dbname,  sql, datas,  batchsize,   batchHandler);
	}

	public static void updateByKeys(String sql, int... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);

				updateByKeys((DBOptions) null, sql,  fields);

	}
	public static void updateByKeysWithDBName(String dbname,String sql, int... fields) throws SQLException {
//		executeBatch(dbname, sql,PreparedDBUtil.DELETE, fields);

				updateByKeysWithDBName((DBOptions) null, dbname,  sql,   fields) ;

	}

	public static void updateByLongKeys(String sql, long... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);

				updateByLongKeys((DBOptions) null, sql,   fields);

	}
	public static void updateByLongKeysWithDBName(String dbname,String sql, long... fields) throws SQLException {
//		executeBatch(dbname, sql,PreparedDBUtil.DELETE, fields);

				updateByLongKeysWithDBName((DBOptions) null, dbname,  sql,  fields);

	}

	public static void updateByKeys(String sql, String... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);

				updateByKeys((DBOptions) null, sql,  fields);

	}
	public static void updateByKeysWithDBName(String dbname,String sql, String... fields) throws SQLException {
//		executeBatch(dbname, sql,PreparedDBUtil.DELETE, fields);

				updateByKeysWithDBName((DBOptions) null, dbname,  sql,   fields) ;

	}

	public static void deleteByKeys(String sql, String... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);

				deleteByKeys((DBOptions) null, sql,   fields);

	}
	public static void deleteByKeysWithDBName(String dbname,String sql, String... fields) throws SQLException {
//		executeBatch(dbname, sql,PreparedDBUtil.DELETE, fields);

				deleteByKeysWithDBName((DBOptions) null, dbname,  sql,   fields);

	}

	public static void deleteByShortKeys(String sql, short... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);

				deleteByShortKeys((DBOptions) null, sql,   fields);

	}
	public static void deleteByShortKeysWithDBName(String dbname,String sql, short... fields) throws SQLException {
//		executeBatch(dbname, sql,PreparedDBUtil.DELETE, fields);

				deleteByShortKeysWithDBName((DBOptions) null, dbname,  sql,   fields) ;
	}

	public static void updateByShortKeys(String sql, short... fields) throws SQLException {
//		executeBatch(null, sql,PreparedDBUtil.DELETE, fields);

				updateByShortKeys((DBOptions) null, sql,  fields);

	}
	public static void updateByShortKeysWithDBName(String dbname,String sql, short... fields) throws SQLException {
//		executeBatch(dbname, sql,PreparedDBUtil.DELETE, fields);

				updateByShortKeysWithDBName((DBOptions) null, dbname,  sql,  fields);
	}

	public static Object insert(String sql, Object... fields) throws SQLException {
//		return execute(null, sql,PreparedDBUtil.INSERT, fields);

		return insert((DBOptions) null, sql,(DBOptions) null, fields) ;
	}

	public static Object updateWithDBName(String dbname, String sql, Object... fields) throws SQLException {
//		return execute(dbname, sql,PreparedDBUtil.UPDATE, fields);

		return updateWithDBName((DBOptions) null, dbname,   sql,  fields) ;
	}

	public static Object deleteWithDBName(String dbname, String sql, Object... fields) throws SQLException {
//		return execute(dbname, sql,PreparedDBUtil.DELETE, fields);

		return deleteWithDBName((DBOptions) null, dbname,   sql,  fields) ;

	}

	public static Object insertWithDBName(String dbname, String sql, Object... fields) throws SQLException {
//		return execute(dbname, sql,PreparedDBUtil.INSERT, fields);

		return insertWithDBName((DBOptions) null, dbname,   sql,   fields);
	}

	public static void updateBeans(String dbname, String sql, List beans) throws SQLException {

				updateBeans((DBOptions) null, dbname,   sql,   beans);
	}

	public static void updateBeans(String dbname, String sql, List beans,GetCUDResult GetCUDResult) throws SQLException {

				updateBeans(	(DBOptions) null, dbname,   sql,   beans,  GetCUDResult) ;
	}

	public static void deleteBeans(String dbname, String sql, List beans) throws SQLException {

				deleteBeans((DBOptions) null, dbname,   sql,   beans);

	}

	public static void deleteBeans(String dbname, String sql, List beans,GetCUDResult GetCUDResult) throws SQLException {

				deleteBeans((DBOptions) null, dbname,   sql,   beans,  GetCUDResult);

	}

	public static void insertBean(String dbname, String sql, Object bean) throws SQLException {

				insertBean((DBOptions) null, dbname,   sql,   bean) ;
	}

	public static void insertBean(String dbname, String sql, Object bean,GetCUDResult getCUDResult) throws SQLException {

				insertBean((DBOptions) null, dbname,   sql,   bean,  getCUDResult);
	}

	public static void updateBean(String dbname, String sql, Object bean) throws SQLException {

				updateBean((DBOptions) null, dbname,   sql,   bean) ;

	}

	public static void updateBean(String dbname, String sql, Object bean,GetCUDResult getCUDResult) throws SQLException {

				updateBean( (DBOptions) null, dbname,   sql,   bean,  getCUDResult) ;
	}

	public static void updateBean( String sql, Object bean,GetCUDResult getCUDResult) throws SQLException {
//		if(bean == null )
//			return ;
//		List datas = new ArrayList();
//		datas.add(bean);
//		updateBeans( null,  sql,  datas);

				updateBean( (DBOptions) null, sql,   bean,  getCUDResult) ;
	}

	public static void deleteBean( String sql, Object bean,GetCUDResult getCUDResult) throws SQLException {

				deleteBean( (DBOptions) null, sql,   bean,  getCUDResult) ;
	}

	public static void deleteBean(String dbname, String sql, Object bean) throws SQLException {

				deleteBean(	(DBOptions) null, dbname,   sql,   bean);
	}
	public static void deleteBean(String dbname, String sql, Object bean,GetCUDResult getCUDResult) throws SQLException {

				deleteBean((DBOptions) null, dbname,   sql,   bean,  getCUDResult) ;
	}

	public static void insertBeans(String sql, List beans) throws SQLException {

				insertBeans( (DBOptions) null,sql, beans);
	}

	public static void insertBeans(String sql, List beans,GetCUDResult getCUDResult) throws SQLException {

				insertBeans( (DBOptions) null,sql, beans,getCUDResult);
	}

	public static void updateBeans( String sql, List beans) throws SQLException {
		updateBeans( (DBOptions) null,sql, beans);
	}

	public static void deleteBeans( String sql, List beans) throws SQLException {
		deleteBeans( (DBOptions) null,sql, beans);

	}

	public static void insertBean( String sql, Object bean) throws SQLException {
//		if(bean == null)
//			return ;
//		List datas = new ArrayList();
//		datas.add(bean);
//		insertBeans( null,  sql,  datas);

				insertBean( (DBOptions) null,sql, bean);
	}
	public static void insertBean( String sql, Object bean,GetCUDResult getCUDResult) throws SQLException {
//		if(bean == null)
//			return ;
//		List datas = new ArrayList();
//		datas.add(bean);
//		insertBeans( null,  sql,  datas);

				insertBean( (DBOptions) null,sql, bean,getCUDResult);
	}

	public static void updateBean( String sql, Object bean) throws SQLException {
//		if(bean == null )
//			return ;
//		List datas = new ArrayList();
//		datas.add(bean);
//		updateBeans( null,  sql,  datas);

				updateBean((DBOptions) null,sql, bean);
	}

	public static void deleteBean(String sql, Object bean) throws SQLException {

//		if(bean == null)
//			return ;
//		List datas = new ArrayList();
//		datas.add(bean);
//		deleteBeans( null,  sql,  datas);
		deleteBean(  (DBOptions) null,sql,   bean);

	}

	public static <T> List<T> queryList(Class<T> beanType, String sql, Object... fields) throws SQLException
	{

		return queryList((DBOptions) null, beanType,   sql,  fields);
	}
	/**
	 *
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoWithDBName(Class<?> beanType,String dbname, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql,offset,pagesize);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoWithDBName((DBOptions) null,beanType,  dbname,   sql,   offset,  pagesize, fields);
	}
	public static ListInfo queryListInfoWithDBName2ndTotalsize(Class<?> beanType,String dbname, String sql, long offset,int pagesize,long totalsize,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql,offset,pagesize,totalsize);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;
		return queryListInfoWithDBName2ndTotalsize((DBOptions) null, beanType,  dbname,   sql,   offset,  pagesize,  totalsize,fields) ;
	}
	public static ListInfo queryListInfoWithDBName2ndTotalsizesql(Class<?> beanType,String dbname, String sql, long offset,int pagesize,String totalsizesql,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelectWithTotalsizesql(dbname, sql,offset,pagesize,totalsizesql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoWithDBName2ndTotalsizesql((DBOptions) null,beanType,  dbname,   sql,   offset,  pagesize,  totalsizesql,  fields) ;
	}
	/**
	 *
	 * @param beanType
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfo(Class<?> beanType, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

		return queryListInfo((DBOptions) null, beanType,   sql,   offset,  pagesize, fields);
	}

	public static ListInfo queryListInfoWithTotalsize(Class<?> beanType, String sql, long offset,int pagesize,long totalsize,Object... fields) throws SQLException
	{

		return queryListInfoWithTotalsize((DBOptions) null, beanType,   sql,   offset,  pagesize,  totalsize, fields);
	}

	public static ListInfo queryListInfoWithTotalsizesql(Class<?> beanType, String sql, long offset,int pagesize,String totalsizesql,Object... fields) throws SQLException
	{

		return queryListInfoWithDBName2ndTotalsizesql((DBOptions) null,beanType, null,sql, offset,pagesize,totalsizesql,fields);
	}

	public static <T> T queryObject(Class<T> beanType, String sql, Object... fields) throws SQLException
	{

		return queryObjectWithDBName((DBOptions) null,beanType,null, sql, fields);

	}

	public static <T> List<T> queryListWithDBName(Class<T> beanType,String dbname, String sql, Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//
//		return dbutil.executePreparedForList(beanType);

		return queryListWithDBName((DBOptions) null, beanType,  dbname,   sql,   fields) ;
	}

	public static <T> T queryObjectWithDBName(Class<T> beanType,String dbname, String sql, Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//		return (T)dbutil.executePreparedForObject(beanType);

		return queryObjectWithDBName((DBOptions) null, beanType,  dbname,   sql, fields);

	}

	public static <T> List<T> queryListByRowHandler(RowHandler rowhandler,Class<T> beanType, String sql, Object... fields) throws SQLException
	{

		return queryListWithDBNameByRowHandler((DBOptions) null,rowhandler,beanType,null, sql, fields);
	}
	/**
	 *
	 * @param rowhandler
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoWithDBNameByRowHandler(RowHandler rowhandler,Class<?> beanType,String dbname, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql,offset,pagesize);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType,rowhandler));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoWithDBNameByRowHandler((DBOptions) null, rowhandler, beanType,  dbname,   sql,   offset,  pagesize, fields);
	}

	public static ListInfo queryListInfoWithDBName2ndTotalsizeByRowHandler(RowHandler rowhandler,Class<?> beanType,String dbname, String sql,
																		   long offset,int pagesize,long totalsize,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql,offset,pagesize,totalsize);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType,rowhandler));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoWithDBName2ndTotalsizeByRowHandler((DBOptions) null, rowhandler,  beanType,  dbname,   sql,
		  offset,  pagesize,  totalsize, fields);
	}

	public static ListInfo queryListInfoWithDBName2ndTotalsizesqlByRowHandler(RowHandler rowhandler,Class<?> beanType,String dbname, String sql,
																			  long offset,int pagesize,String totalsizesql,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelectWithTotalsizesql(dbname, sql,offset,pagesize,totalsizesql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType,rowhandler));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoWithDBName2ndTotalsizesqlByRowHandler((DBOptions) null, rowhandler, beanType,  dbname,   sql,
		  offset,  pagesize,  totalsizesql,  fields);
	}
	/**
	 *
	 * @param rowhandler
	 * @param beanType
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoByRowHandler(RowHandler rowhandler,Class<?> beanType, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

		return queryListInfoWithDBNameByRowHandler((DBOptions) null, rowhandler,beanType, null,sql, offset,pagesize,fields);
	}

	public static ListInfo queryListInfoWithTotalsizeByRowHandler(RowHandler rowhandler,Class<?> beanType, String sql, long offset,int pagesize,long totalsize,Object... fields) throws SQLException
	{

		return queryListInfoWithDBName2ndTotalsizeByRowHandler((DBOptions) null, rowhandler,beanType, null,sql, offset,pagesize,totalsize,fields);
	}

	public static ListInfo queryListInfoWithTotalsizesqlByRowHandler(RowHandler rowhandler,Class<?> beanType, String sql, long offset,int pagesize,String totalsizesql,Object... fields) throws SQLException
	{

		return queryListInfoWithDBName2ndTotalsizesqlByRowHandler( (DBOptions) null,rowhandler,beanType, null,sql, offset,pagesize,totalsizesql,fields);
	}

	public static <T> T queryObjectByRowHandler(RowHandler rowhandler,Class<T> beanType, String sql, Object... fields) throws SQLException
	{

		return queryObjectWithDBNameByRowHandler(	(DBOptions) null,rowhandler,beanType,null, sql, fields);

	}

	public static <T> List<T> queryListWithDBNameByRowHandler(RowHandler rowhandler,Class<T> beanType,String dbname, String sql, Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//
//		return dbutil.executePreparedForList(beanType,rowhandler);

		return queryListWithDBNameByRowHandler((DBOptions) null, rowhandler, beanType,  dbname,   sql,   fields);
	}

	public static <T> T queryObjectWithDBNameByRowHandler(RowHandler rowhandler,Class<T> beanType,String dbname, String sql, Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//		return (T)dbutil.executePreparedForObject(beanType,rowhandler);

		return queryObjectWithDBNameByRowHandler((DBOptions) null, rowhandler,  beanType,  dbname,   sql,   fields);

	}

	/**
	 * 采用Null行处理器的通用查询,适用于单个Object查询,List查询等等
	 * @param rowhandler
	 * @param sql
	 * @param fields
	 * @throws SQLException
	 */
	public static void queryByNullRowHandler(NullRowHandler rowhandler, String sql, Object... fields) throws SQLException
	{

				queryWithDBNameByNullRowHandler((DBOptions) null, rowhandler,null, sql, fields);
	}

	/**
	 *
	 * @param rowhandler
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoWithDBNameByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql,offset,pagesize);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//		dbutil.executePreparedWithRowHandler(rowhandler);
//		ListInfo datas = new ListInfo();
//
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoWithDBNameByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,   offset,  pagesize,  fields);
	}
	public static ListInfo queryListInfoWithDBName2ndTotalsizeByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, long offset,
																			   int pagesize,long totalsize,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql,offset,pagesize,totalsize);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//		dbutil.executePreparedWithRowHandler(rowhandler);
//		ListInfo datas = new ListInfo();
//
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoWithDBName2ndTotalsizeByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,   offset,
		  pagesize,  totalsize, fields) ;
	}
	public static ListInfo queryListInfoWithDBName2ndTotalsizesqlByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, long offset,
																				  int pagesize,String totalsizesql,Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelectWithTotalsizesql(dbname, sql,offset,pagesize,totalsizesql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//		dbutil.executePreparedWithRowHandler(rowhandler);
//		ListInfo datas = new ListInfo();
//
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoWithDBName2ndTotalsizesqlByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,   offset,
		  pagesize,  totalsizesql,  fields) ;
	}
	/**
	 *
	 * @param rowhandler
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoByNullRowHandler(NullRowHandler rowhandler, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

		return queryListInfoWithDBNameByNullRowHandler( (DBOptions) null,rowhandler, null,sql, offset,pagesize,fields);
	}
	public static ListInfo queryListInfoWithTotalsizeByNullRowHandler(NullRowHandler rowhandler, String sql, long offset,int pagesize,long totalsize,Object... fields) throws SQLException
	{

		return queryListInfoWithDBName2ndTotalsizeByNullRowHandler( (DBOptions) null,rowhandler, null,sql, offset,pagesize,totalsize,fields);
	}
	public static ListInfo queryListInfoWithTotalsizesqlByNullRowHandler(NullRowHandler rowhandler, String sql, long offset,int pagesize,String totalsizesql,Object... fields) throws SQLException
	{
		return queryListInfoWithDBName2ndTotalsizesqlByNullRowHandler( (DBOptions) null,rowhandler, null,sql, offset,pagesize,totalsizesql,fields);
	}

	/**
	 * 采用Null行处理器的通用查询,适用于单个Object查询,List查询等等
	 * @param rowhandler
	 * @param dbname
	 * @param sql
	 * @param fields
	 * @throws SQLException
	 */
	public static void queryWithDBNameByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//
//		 dbutil.executePreparedWithRowHandler(rowhandler);

		queryWithDBNameByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,  fields) ;
	}

	public static <T> List<T> queryListBean(Class<T> beanType, String sql, Object bean) throws SQLException
	{

		return queryListBeanWithDBName((DBOptions) null,beanType,null, sql, bean);
	}
	/**
	 *
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param totalsize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBeanWithDBName(Class<?> beanType,String dbname, String sql, long offset,int pagesize,long totalsize,Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean, new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql,offset,pagesize,totalsize);
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoBeanWithDBName((DBOptions) null, beanType,  dbname,   sql,   offset,  pagesize,  totalsize,  bean) ;
	}

	public static ListInfo queryListInfoBeanWithDBName(Class<?> beanType,String dbname, String sql, long offset,int pagesize,String totalsizesql,Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean, new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelectWithTotalsizesql(params,dbname, sql,offset,pagesize,totalsizesql);
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoBeanWithDBName((DBOptions) null, beanType,  dbname,   sql,   offset,  pagesize,  totalsizesql,  bean) ;
	}

	/**
	 *
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBeanWithDBName(Class<?> beanType,String dbname, String sql, long offset,int pagesize,Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean, new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql,offset,pagesize,-1L);
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoBeanWithDBName((DBOptions) null,beanType,  dbname,   sql,   offset,  pagesize,  bean) ;
	}
	/**
	 *
	 * @param beanType
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param totalsize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBean(Class<?> beanType, String sql, long offset,int pagesize,long totalsize,Object bean) throws SQLException
	{

		return queryListInfoBeanWithDBName((DBOptions) null,beanType, null,sql, offset,pagesize,totalsize,bean);
	}

	public static ListInfo queryListInfoBean(Class<?> beanType, String sql, long offset,int pagesize,String totalsizesql,Object bean) throws SQLException
	{
		return queryListInfoBeanWithDBName((DBOptions) null,beanType, null,sql, offset,pagesize,totalsizesql,bean);
	}

	public static ListInfo queryListInfoBean(Class<?> beanType, String sql, long offset,int pagesize,Object bean) throws SQLException
	{
		return queryListInfoBeanWithDBName((DBOptions) null,beanType, null,sql, offset,pagesize,-1L,bean);
	}

	public static String queryField( String sql, Object... fields) throws SQLException
	{
		return queryFieldWithDBName((DBOptions) null,(String)null, sql, fields);
	}
	public static String queryFieldBean( String sql, Object bean) throws SQLException
	{
		return queryFieldBeanWithDBName((DBOptions) null,(String)null, sql, bean);
	}

	public static String queryFieldBeanWithDBName(String dbname, String sql, Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql);
//
//
//
//
//		dbutil.executePrepared();
//		if(dbutil.size() > 0)
//			return dbutil.getString(0, 0);
//		else
//		{
//			return null;
//		}

		return queryFieldBeanWithDBName((DBOptions) null, dbname,   sql,   bean) ;
	}

	public static String queryFieldWithDBName(String dbname, String sql, Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//
//		dbutil.executePrepared();
//		if(dbutil.size() > 0)
//			return dbutil.getString(0, 0);
//		else
//		{
//			return null;
//		}

		return queryFieldWithDBName((DBOptions) null, dbname,   sql,  fields) ;
	}

	/**
	 *
	 * @param <T>
	 * @param type
	 * @param sql
	 * @param fields
	 * @return
	 * @throws SQLException
	 */

	public static <T> T queryTField( Class<T> type,String sql, Object... fields) throws SQLException
	{

		return queryTFieldWithDBName((DBOptions) null,(String)null, type,sql, fields);
	}
	public static <T> T queryTFieldBean( Class<T> type,String sql, Object bean) throws SQLException
	{

		return queryTFieldBeanWithDBName((DBOptions) null,(String)null, type,sql, bean);
	}

	public static <T> T queryTFieldBeanWithDBName(String dbname, Class<T> type,String sql, Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean, sql, dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql);
//
//
//
//
//		dbutil.executePrepared();
//		if(dbutil.size() > 0)
//			return (T)ValueObjectUtil.typeCast(dbutil.getObject(0, 0),type);
//		else
//		{
//			return (T)ValueObjectUtil.getDefaultValue(type);
//		}

		return queryTFieldBeanWithDBName((DBOptions) null,dbname, type,(FieldRowHandler<T>)null,sql, bean) ;
	}

	public static <T> T queryTFieldWithDBName(String dbname, Class<T> type,String sql, Object... fields) throws SQLException
	{

		return queryTFieldWithDBName((DBOptions) null,dbname, type,(FieldRowHandler<T>)null,sql, fields);
	}

	public static <T> T queryTField( Class<T> type,FieldRowHandler<T> fieldRowHandler,String sql, Object... fields) throws SQLException
	{
		return queryTFieldWithDBName((DBOptions) null,(String)null, type,fieldRowHandler,sql, fields);
	}
	public static <T> T queryTFieldBean( Class<T> type,FieldRowHandler<T> fieldRowHandler,String sql, Object bean) throws SQLException
	{
		return queryTFieldBeanWithDBName((DBOptions) null,(String)null, type,fieldRowHandler,sql, bean);
	}

	public static <T> T queryTFieldBeanWithDBName(String dbname, Class<T> type,FieldRowHandler<T> fieldRowHandler,String sql, Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql);
//
//
//
//		if(fieldRowHandler == null)
//		{
//			dbutil.executePrepared();
//			if(dbutil.size() > 0)
//				return (T)ValueObjectUtil.typeCast(dbutil.getObject(0, 0),type);
//			else
//			{
//				return (T)ValueObjectUtil.getDefaultValue(type);
//			}
//
//		}
//		else
//		{
//			return (T)dbutil.executePreparedForObject(type, fieldRowHandler);
//		}

		return queryTFieldBeanWithDBName((DBOptions) null, dbname,  type, fieldRowHandler,  sql,   bean) ;

	}

	public static <T> T queryTFieldWithDBName(String dbname, Class<T> type,FieldRowHandler<T> fieldRowHandler,String sql, Object... fields) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		dbutil.preparedSelect(dbname, sql);
//		if(fields != null && fields.length > 0)
//		{
//			for(int i = 0; i < fields.length ; i ++)
//			{
//
//				Object field = fields[i];
//				dbutil.setObject(i + 1, field);
//			}
//		}
//
//
//
//		if(fieldRowHandler == null)
//		{
//			dbutil.executePrepared();
//			if(dbutil.size() > 0)
//				return (T)ValueObjectUtil.typeCast(dbutil.getObject(0, 0),type);
//			else
//			{
//				return (T)ValueObjectUtil.getDefaultValue(type);
//			}
//		}
//		else
//		{
//			return (T)dbutil.executePreparedForObject(type, fieldRowHandler);
//		}

		return queryTFieldWithDBName((DBOptions) null, dbname,  type,  fieldRowHandler,  sql,   fields);
	}

	public static <T> T queryObjectBean(Class<T> beanType, String sql, Object bean) throws SQLException
	{

		return queryObjectBeanWithDBName((DBOptions) null,beanType,null, sql, bean);

	}

	public static <T> List<T> queryListBeanWithDBName(Class<T> beanType,String dbname, String sql, Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql);
//
//
//
//
//
//		return dbutil.executePreparedForList(beanType);
		return queryListBeanWithDBName((DBOptions) null,beanType,  dbname,   sql,   bean) ;
	}

	public static <T> T queryObjectBeanWithDBName(Class<T> beanType,String dbname, String sql, Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql);
//		return (T)dbutil.executePreparedForObject(beanType);

		return queryObjectBeanWithDBName((DBOptions) null, beanType,  dbname,   sql,   bean);

	}

	public static <T> List<T> queryListBeanByRowHandler(RowHandler rowhandler,Class<T> beanType, String sql, Object bean) throws SQLException
	{

		return queryListBeanWithDBNameByRowHandler((DBOptions) null,rowhandler,beanType,(String)null, sql, bean);
	}
	/**
	 *
	 * @param rowhandler
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param totalsize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBeanWithDBNameByRowHandler(RowHandler rowhandler,Class<?> beanType,String dbname, String sql, long offset,
																   int pagesize,long totalsize,Object  bean) throws SQLException
	{

		return queryListInfoBeanWithDBNameByRowHandler((DBOptions) null, rowhandler, beanType,  dbname,   sql,   offset,
		  pagesize,  totalsize,   bean);
	}

	public static ListInfo queryListInfoBeanWithDBNameByRowHandler(RowHandler rowhandler,Class<?> beanType,String dbname, String sql, long offset,int pagesize,String totalsizesql,Object  bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelectWithTotalsizesql(params,dbname, sql,offset,pagesize,totalsizesql);
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType,rowhandler));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoBeanWithDBNameByRowHandler(	(DBOptions) null, rowhandler, beanType,  dbname,   sql,   offset,  pagesize,  totalsizesql,   bean) ;
	}
	/**
	 *
	 * @param rowhandler
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBeanWithDBNameByRowHandler(RowHandler rowhandler,Class<?> beanType,String dbname, String sql, long offset,int pagesize,Object  bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql,offset,pagesize,-1L);
//		ListInfo datas = new ListInfo();
//		datas.setDatas(dbutil.executePreparedForList(beanType,rowhandler));
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoBeanWithDBNameByRowHandler((DBOptions) null, rowhandler, beanType,  dbname,   sql,   offset,  pagesize,   bean);
	}
	/**
	 *
	 * @param rowhandler
	 * @param beanType
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param totalsize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBeanByRowHandler(RowHandler rowhandler,Class<?> beanType, String sql, long offset,int pagesize,long totalsize,Object bean) throws SQLException
	{

		return queryListInfoBeanWithDBNameByRowHandler( (DBOptions) null,rowhandler,beanType, (String)null,sql, offset,pagesize,totalsize,bean);
	}

	public static ListInfo queryListInfoBeanByRowHandler(RowHandler rowhandler,Class<?> beanType, String sql, long offset,int pagesize,String totalsizesql,Object bean) throws SQLException
	{
		return queryListInfoBeanWithDBNameByRowHandler( (DBOptions) null,rowhandler,beanType, (String)null,sql, offset,pagesize,totalsizesql,bean);
	}
	public static ListInfo queryListInfoBeanByRowHandler(RowHandler rowhandler,Class<?> beanType, String sql, long offset,int pagesize,Object bean) throws SQLException
	{
		return queryListInfoBeanWithDBNameByRowHandler( (DBOptions) null,rowhandler,beanType, (String)null,sql, offset,pagesize,-1L,bean);
	}

	public static <T> T queryObjectBeanByRowHandler(RowHandler rowhandler,Class<T> beanType, String sql, Object bean) throws SQLException
	{
		return queryObjectBeanWithDBNameByRowHandler((DBOptions) null,rowhandler,beanType,(String)null, sql, bean);

	}

	public static <T> List<T> queryListBeanWithDBNameByRowHandler(RowHandler rowhandler,Class<T> beanType,String dbname, String sql, Object bean) throws SQLException
	{

		return queryListBeanWithDBNameByRowHandler((DBOptions) null, rowhandler,  beanType,  dbname,   sql,   bean) ;
	}

	public static <T> T queryObjectBeanWithDBNameByRowHandler(RowHandler rowhandler,Class<T> beanType,String dbname, String sql, Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql);
//		return (T)dbutil.executePreparedForObject(beanType,rowhandler);

		return queryObjectBeanWithDBNameByRowHandler((DBOptions) null, rowhandler,  beanType,  dbname,   sql,   bean);
	}

	public static void queryBeanByNullRowHandler(NullRowHandler rowhandler, String sql, Object bean) throws SQLException
	{

				queryBeanWithDBNameByNullRowHandler((DBOptions) null, rowhandler,(String)null, sql, bean);
	}
	/**
	 *
	 * @param rowhandler
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param totalsize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBeanWithDBNameByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, long offset,int pagesize,long totalsize,Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql,offset,pagesize,totalsize);
//		dbutil.executePreparedWithRowHandler(rowhandler);
//		ListInfo datas = new ListInfo();
//
//		datas.setTotalSize(dbutil.getLongTotalSize());
//		return datas;

		return queryListInfoBeanWithDBNameByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,   offset,  pagesize,  totalsize,  bean);
	}

	public static ListInfo queryListInfoBeanWithDBNameByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql,
																	   long offset,int pagesize,String totalsizesql,Object bean) throws SQLException
	{

		return queryListInfoBeanWithDBNameByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,
		  offset,  pagesize,  totalsizesql,  bean);
	}
	/**
	 *
	 * @param rowhandler
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBeanWithDBNameByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, long offset,int pagesize,Object bean) throws SQLException
	{

		return queryListInfoBeanWithDBNameByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,   offset,  pagesize,  bean) ;
	}
	/**
	 *
	 * @param rowhandler
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param totalsize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo queryListInfoBeanByNullRowHandler(NullRowHandler rowhandler, String sql, long offset,int pagesize,long totalsize,Object bean) throws SQLException
	{

		return queryListInfoBeanWithDBNameByNullRowHandler((DBOptions) null, rowhandler, (String)null,sql, offset,pagesize,totalsize,bean);
	}

	public static ListInfo queryListInfoBeanByNullRowHandler(NullRowHandler rowhandler, String sql, long offset,int pagesize,String totalsizesql,Object bean) throws SQLException
	{

		return queryListInfoBeanWithDBNameByNullRowHandler( (DBOptions) null,rowhandler, (String)null,sql, offset,pagesize,totalsizesql,bean);
	}

	public static ListInfo queryListInfoBeanByNullRowHandler(NullRowHandler rowhandler, String sql, long offset,int pagesize,Object bean) throws SQLException
	{
		return queryListInfoBeanWithDBNameByNullRowHandler( (DBOptions) null,rowhandler, (String)null,sql, offset,pagesize,-1L,bean);
	}

	public static void queryBeanWithDBNameByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, Object bean) throws SQLException
	{

//		PreparedDBUtil dbutil = new PreparedDBUtil();
//		SQLParams params = SQLParams.convertBeanToSqlParams(bean,  new SQLInfo(sql,true,false), dbname, PreparedDBUtil.SELECT, null);
//		dbutil.preparedSelect(params,dbname, sql);
//		 dbutil.executePreparedWithRowHandler(rowhandler);

				queryBeanWithDBNameByNullRowHandler(	(DBOptions) null, rowhandler,  dbname,   sql,   bean) ;
	}

	/**
	 * more分页查询,不会计算总记录数,如果没有记录那么返回的ListInfo的datas的size为0,
	 * 提升性能,同时前台标签库也会做响应的调整
	 */
	/**
	 *
	 * @param rowhandler
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfoWithDBNameByRowHandler(RowHandler rowhandler,Class<?> beanType,String dbname, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

//		return SQLInfoExecutor.queryListInfoWithDBNameByRowHandler(  rowhandler, beanType, dbname, sqlinfo, offset,pagesize,fields);

//		SQLInfo sql = getSqlInfo(dbname, sqlname);
		return moreListInfoWithDBNameByRowHandler((DBOptions) null, rowhandler,  beanType,  dbname,   sql,   offset,  pagesize,  fields);
	}

	/**
	 *
	 * @param rowhandler
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfoWithDBNameByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

//		return SQLInfoExecutor.queryListInfoWithDBNameByNullRowHandler(   rowhandler, dbname,  sqlinfo,  offset, pagesize, fields);
//		SQLInfo sql = getSqlInfo(dbname, sqlname);
		return moreListInfoWithDBNameByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,   offset,  pagesize,  fields) ;
	}

		/**
	 *
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfoWithDBName(Class<?> beanType,String dbname, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

//		return SQLInfoExecutor.queryListInfoWithDBName(  beanType, dbname,  sqlinfo,  offset, pagesize, fields);
//		SQLInfo sql = getSqlInfo(dbname, sqlname);
		return moreListInfoWithDBName((DBOptions) null, beanType,  dbname,   sql,   offset,  pagesize,  fields) ;
	}

		/**
	 *
	 * @param rowhandler
	 * @param beanType
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfoByRowHandler(RowHandler rowhandler,Class<?> beanType, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

		return moreListInfoWithDBNameByRowHandler( (DBOptions) null,rowhandler,beanType, (String)null,sql, offset,pagesize,fields);
	}

		/**
	 *
	 * @param rowhandler
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfoByNullRowHandler(NullRowHandler rowhandler, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

		return moreListInfoWithDBNameByNullRowHandler((DBOptions) null, rowhandler, (String)null,sql, offset,pagesize,fields);
	}

		/**
	 *
	 * @param rowhandler
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfoBeanWithDBNameByRowHandler(RowHandler rowhandler,Class<?> beanType,String dbname, String sql, long offset,int pagesize,Object  bean) throws SQLException
	{

//		return SQLInfoExecutor.queryListInfoBeanWithDBNameByRowHandler(  rowhandler,beanType,dbname, sqlinfo, offset,pagesize,bean);
//		SQLInfo sql = getSqlInfo(dbname, sql);
		return moreListInfoBeanWithDBNameByRowHandler((DBOptions) null, rowhandler, beanType,  dbname,   sql,   offset,  pagesize,   bean);
	}

		/**
	 *
	 * @param rowhandler
	 * @param dbname

	 * @param offset
	 * @param pagesize

	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfoBeanWithDBNameByNullRowHandler(NullRowHandler rowhandler,String dbname, String sql, long offset,int pagesize,Object bean) throws SQLException
	{

		return moreListInfoBeanWithDBNameByNullRowHandler((DBOptions) null, rowhandler,  dbname,   sql,   offset,  pagesize,  bean) ;
	}

		/**
	 *
	 * @param beanType
	 * @param dbname
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param bean
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfoBeanWithDBName(Class<?> beanType,String dbname, String sql, long offset,int pagesize,Object bean) throws SQLException
	{

//		return SQLInfoExecutor.queryListInfoBeanWithDBName( beanType, dbname,  sqlinfo,  offset, pagesize,  bean);
//		SQLInfo sql = getSqlInfo(dbname, sql);
		return moreListInfoBeanWithDBName((DBOptions) null, beanType,  dbname,   sql,   offset,  pagesize,  bean) ;
	}

		public static ListInfo moreListInfoBeanByRowHandler(RowHandler rowhandler,Class<?> beanType, String sql, long offset,int pagesize,Object bean) throws SQLException
	{

//			return SQLInfoExecutor.queryListInfoBeanWithDBNameByRowHandler(  rowhandler,beanType,dbname, sqlinfo, offset,pagesize,totalsize,bean);
			return moreListInfoBeanByRowHandler((DBOptions) null, rowhandler,  beanType,   sql,   offset,  pagesize,  bean);
	}

		public static ListInfo moreListInfoBeanByNullRowHandler(NullRowHandler rowhandler, String sql, long offset,int pagesize,Object bean) throws SQLException
	{

//			return SQLInfoExecutor.queryListInfoBeanWithDBNameByNullRowHandler( rowhandler, dbname,  sqlinfo,  offset, pagesize, totalsize, bean);
//			SQLInfo sql = getSqlInfo(null, sql);
			return moreListInfoBeanByNullRowHandler((DBOptions) null, rowhandler,   sql,   offset,  pagesize,  bean);
	}

		public static ListInfo moreListInfoBean(Class<?> beanType, String sql, long offset,int pagesize,Object bean) throws SQLException
	{

//			return SQLInfoExecutor.queryListInfoBeanWithDBName( beanType, dbname,  sqlinfo,  offset, pagesize, totalsize, bean);
//			SQLInfo sql = getSqlInfo(null, sql);
			return moreListInfoBean((DBOptions) null, beanType,   sql,   offset,  pagesize,  bean) ;
	}

		/**
	 *
	 * @param beanType
	 * @param sql
	 * @param offset
	 * @param pagesize
	 * @param fields
	 * @return
	 * @throws SQLException
	 */
	public static ListInfo moreListInfo(Class<?> beanType, String sql, long offset,int pagesize,Object... fields) throws SQLException
	{

		return moreListInfoWithDBName((DBOptions) null,beanType,(String) null,sql, offset,pagesize,fields);
	}

}


text:
<?php

namespace OC\LouvreBundle\Form;

use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class BilletsType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('dateReservation', DateType::class, array(
                'widget' => 'single_text',
                'format' => 'dd-MM-yyyy',
                'attr'  => array('class' => 'datePicker')
            ))
            ->add('produit', EntityType::class, array(
                'class'         => 'OCLouvreBundle:Produits',
                'choice_label'  => 'nomProduit',
            ))
        ;
    }

    /**
     * {@inheritdoc}
     */
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'OC\LouvreBundle\Entity\Billets'
        ));
    }

}


text:
class CreateRefinerycmsPagesSchema < ActiveRecord::Migration
  def up
    create_table :refinery_page_parts do |t|
      t.integer  :refinery_page_id
      t.string   :title
      t.text     :body
      t.integer  :position

      t.timestamps
    end

    add_index :refinery_page_parts, :id
    add_index :refinery_page_parts, :refinery_page_id

    create_table :refinery_pages do |t|
      t.integer   :parent_id
      t.string    :path
      t.string    :slug
      t.string    :custom_slug
      t.boolean   :show_in_menu,        :default => true
      t.string    :link_url
      t.string    :menu_match
      t.boolean   :deletable,           :default => true
      t.boolean   :draft,               :default => false
      t.boolean   :skip_to_first_child, :default => false
      t.integer   :lft
      t.integer   :rgt
      t.integer   :depth
      t.string    :view_template
      t.string    :layout_template

      t.timestamps
    end

    add_index :refinery_pages, :depth
    add_index :refinery_pages, :id
    add_index :refinery_pages, :lft
    add_index :refinery_pages, :parent_id
    add_index :refinery_pages, :rgt

    Refinery::PagePart.create_translation_table!({
      :body => :text
    })

    Refinery::Page.create_translation_table!({
      :title => :string,
      :custom_slug => :string,
      :menu_title => :string,
      :slug => :string
    })
  end

  def down
    drop_table :refinery_page_parts
    drop_table :refinery_pages
    Refinery::PagePart.drop_translation_table!
    Refinery::Page.drop_translation_table!
  end
end


text:
using System;
using TourDeFrance.Client.Enums;
using TourDeFrance.Client.Interfaces;

namespace TourDeFrance.Client.Requests
{
	public class CreateRiderRequest
	{
		public string FirstName { get; set; }

		public string LastName { get; set; }

		public Gender Gender { get; set; }

		public DateTime? BirthDate { get; set; }

		public string Nationality { get; set; }

		public decimal? Height { get; set; }

		public decimal? Weight { get; set; }

		public byte[] Picture { get; set; }

		public Guid TeamId { get; set; }
	}

	public class UpdateRiderRequest : CreateRiderRequest, IIdentifiable<Guid>
	{
		public Guid Id { get; set; }
	}
}