// Generated by Haxe 4.3.1
package code;

import haxe.root.*;

@SuppressWarnings(value={"rawtypes", "unchecked"})
public class JavaCode extends haxe.lang.HxObject
{
	static
	{
		//line 10 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		{
			//line 10 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			java.lang.Object __temp_odecl2 = null;
			//line 10 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			{
				//line 10 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				java.lang.Object __temp_odecl1 = new haxe.lang.DynamicObject(new java.lang.String[]{"SuppressWarnings"}, new java.lang.Object[]{new haxe.root.Array(new java.lang.Object[]{"checkstyle:CyclomaticComplexity"})}, new java.lang.String[]{}, new double[]{});
				//line 10 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				__temp_odecl2 = new haxe.lang.DynamicObject(new java.lang.String[]{"generateMethods"}, new java.lang.Object[]{__temp_odecl1}, new java.lang.String[]{}, new double[]{});
			}
			
			//line 10 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			code.JavaCode.__meta__ = new haxe.lang.DynamicObject(new java.lang.String[]{"statics"}, new java.lang.Object[]{__temp_odecl2}, new java.lang.String[]{}, new double[]{});
		}
		
	}
	
	public JavaCode(haxe.lang.EmptyObject empty)
	{
	}
	
	
	public JavaCode()
	{
		//line 10 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		code.JavaCode.__hx_ctor_code_JavaCode(this);
	}
	
	
	protected static void __hx_ctor_code_JavaCode(code.JavaCode __hx_this)
	{
	}
	
	
	public static java.lang.Object __meta__;
	
	public static haxe.ds.StringMap<java.lang.String> generate(model.Diagram diagram)
	{
		//line 12 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		haxe.ds.StringMap<java.lang.String> files = new haxe.ds.StringMap<java.lang.String>();
		//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		{
			//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			java.lang.Object set = diagram.iterator();
			//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			while (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.lang.Runtime.callField(set, "hasNext", null)) )))
			{
				//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				model.Set set1 = ((model.Set) (haxe.lang.Runtime.callField(set, "next", null)) );
				//line 14 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				if ((  ! (haxe.root.Std.isOfType(set1, model.Association.class))  || (((model.Association) (set1) )).isClass() )) 
				{
					//line 15 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					files.set(( set1.className + ".java" ), code.JavaCode.generateClass(set1));
				}
				
			}
			
		}
		
		//line 18 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		return files;
	}
	
	
	public static java.lang.String generateClass(model.Set set)
	{
		//line 22 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		java.lang.String content = "";
		//line 23 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		content += code.JavaCode.addImports(set);
		//line 24 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		if (set.isInterface) 
		{
			//line 25 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			content += ( ( ( "public interface " + set.className ) + (( (set.isGeneric()) ? ("<T>") : ("") )) ) + " {\n" );
		}
		else
		{
			//line 27 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			content += ( ( ( ( ( ( "public " + (( (set.isAbstract) ? ("abstract ") : ("") )) ) + "class " ) + set.className ) + (( (set.isGeneric()) ? ("<T> ") : (" ") )) ) + (( (( set.superset != null )) ? (( ( "extends " + set.superset.className ) + (( (set.superset.isGeneric()) ? ("<T> ") : (" ") )) )) : ("") )) ) + " {\n" );
		}
		
		//line 30 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		content += code.JavaCode.generateFields(set);
		//line 31 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		content += code.JavaCode.generateConstructors(set);
		//line 32 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		content += code.JavaCode.generateMethods(set);
		//line 33 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		content += "}\n";
		//line 34 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		return content;
	}
	
	
	public static java.lang.String addImports(model.Set set)
	{
		//line 38 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		haxe.root.Array<java.lang.String> imports = new haxe.root.Array<java.lang.String>();
		//line 39 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		{
			//line 39 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			{
				//line 39 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				haxe.root.Array<model.Field> fields = set.fields;
				//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				{
					//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					int _g = 0;
					//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					while (( _g < fields.length ))
					{
						//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						model.Field field = fields.__get(_g);
						//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						 ++ _g;
						//line 41 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field.classType, 0, 5), "Array") &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.has(((java.lang.Object) (imports) ), haxe.lang.Runtime.toString("java.util.ArrayList"))) )))  )) 
						{
							//line 42 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							imports.push("java.util.ArrayList");
						}
						else
						{
							//line 43 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field.classType, 0, 4), "Date") &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.has(((java.lang.Object) (imports) ), haxe.lang.Runtime.toString("java.time.LocalDate"))) )))  )) 
							{
								//line 44 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								imports.push("java.time.LocalDate");
							}
							else
							{
								//line 45 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field.classType, 0, 4), "Time") &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.has(((java.lang.Object) (imports) ), haxe.lang.Runtime.toString("java.time.LocalTime"))) )))  )) 
								{
									//line 46 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									imports.push("java.time.LocalTime");
								}
								else
								{
									//line 47 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field.classType, 0, 8), "DateTime") &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.has(((java.lang.Object) (imports) ), haxe.lang.Runtime.toString("java.time.LocalDateTime"))) )))  )) 
									{
										//line 48 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
										imports.push("java.time.LocalDateTime");
									}
									
								}
								
							}
							
						}
						
					}
					
				}
				
			}
			
			//line 39 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			{
				//line 39 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				haxe.root.Array<model.Field> fields1 = set.navFields;
				//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				{
					//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					int _g1 = 0;
					//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					while (( _g1 < fields1.length ))
					{
						//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						model.Field field1 = fields1.__get(_g1);
						//line 40 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						 ++ _g1;
						//line 41 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field1.classType, 0, 5), "Array") &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.has(((java.lang.Object) (imports) ), haxe.lang.Runtime.toString("java.util.ArrayList"))) )))  )) 
						{
							//line 42 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							imports.push("java.util.ArrayList");
						}
						else
						{
							//line 43 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field1.classType, 0, 4), "Date") &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.has(((java.lang.Object) (imports) ), haxe.lang.Runtime.toString("java.time.LocalDate"))) )))  )) 
							{
								//line 44 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								imports.push("java.time.LocalDate");
							}
							else
							{
								//line 45 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field1.classType, 0, 4), "Time") &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.has(((java.lang.Object) (imports) ), haxe.lang.Runtime.toString("java.time.LocalTime"))) )))  )) 
								{
									//line 46 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									imports.push("java.time.LocalTime");
								}
								else
								{
									//line 47 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field1.classType, 0, 8), "DateTime") &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.has(((java.lang.Object) (imports) ), haxe.lang.Runtime.toString("java.time.LocalDateTime"))) )))  )) 
									{
										//line 48 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
										imports.push("java.time.LocalDateTime");
									}
									
								}
								
							}
							
						}
						
					}
					
				}
				
			}
			
		}
		
		//line 52 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		java.lang.String content = "";
		//line 53 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		{
			//line 53 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			int _g2 = 0;
			//line 53 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			while (( _g2 < imports.length ))
			{
				//line 53 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				java.lang.String impt = imports.__get(_g2);
				//line 53 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				 ++ _g2;
				//line 54 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				content += ( ( "import " + impt ) + ";\n" );
			}
			
		}
		
		//line 56 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		if (( imports.length != 0 )) 
		{
			//line 56 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			content += "\n";
		}
		
		//line 57 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		return content;
	}
	
	
	public static java.lang.String generateFields(model.Set set)
	{
		//line 61 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		java.lang.String content = "";
		//line 62 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		{
			//line 62 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			{
				//line 62 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				haxe.root.Array<model.Field> fields = set.fields;
				//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				{
					//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					int _g = 0;
					//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					while (( _g < fields.length ))
					{
						//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						model.Field field = fields.__get(_g);
						//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						 ++ _g;
						//line 64 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						content += ( ( ( ( ( ( "\t" + (( (( field.visibility == model.Field.ACCESS_PRIVATE )) ? ("") : (( (( field.visibility == model.Field.ACCESS_PROTECTED )) ? ("protected ") : ("public ") )) )) ) + (( (field.isStatic) ? ("static ") : ("") )) ) + code.JavaCode.getType(field.classType) ) + " " ) + field.className ) + ";\n" );
					}
					
				}
				
			}
			
			//line 62 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			{
				//line 62 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				haxe.root.Array<model.Field> fields1 = set.navFields;
				//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				{
					//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					int _g1 = 0;
					//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					while (( _g1 < fields1.length ))
					{
						//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						model.Field field1 = fields1.__get(_g1);
						//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						 ++ _g1;
						//line 64 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						content += ( ( ( ( ( ( "\t" + (( (( field1.visibility == model.Field.ACCESS_PRIVATE )) ? ("") : (( (( field1.visibility == model.Field.ACCESS_PROTECTED )) ? ("protected ") : ("public ") )) )) ) + (( (field1.isStatic) ? ("static ") : ("") )) ) + code.JavaCode.getType(field1.classType) ) + " " ) + field1.className ) + ";\n" );
					}
					
				}
				
			}
			
		}
		
		//line 68 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		return content;
	}
	
	
	public static java.lang.String generateMethods(model.Set set)
	{
		//line 73 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		java.lang.String content = "";
		//line 74 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		{
			//line 74 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			int _g = 0;
			//line 74 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			haxe.root.Array<haxe.root.Array<model.Method>> _g1 = new haxe.root.Array<haxe.root.Array<model.Method>>(new haxe.root.Array[]{set.accessors, set.methods});
			//line 74 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			while (( _g < _g1.length ))
			{
				//line 74 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				haxe.root.Array<model.Method> methods = _g1.__get(_g);
				//line 74 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				 ++ _g;
				//line 75 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				{
					//line 75 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					int _g2 = 0;
					//line 75 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					while (( _g2 < methods.length ))
					{
						//line 75 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						model.Method method = methods.__get(_g2);
						//line 75 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						 ++ _g2;
						//line 76 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(method.className, 0, 3), "get") && haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(method.classType, 0, 5), "Array") )) 
						{
							//line 76 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							content += "\n\t@SuppressWarnings(\"unchecked\")";
						}
						
						//line 77 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						if (code.Code.overrides(set, method)) 
						{
							//line 77 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							content += "\n\t@Override";
						}
						
						//line 78 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						java.lang.String content1 = ( (( method.visibility == model.Field.ACCESS_PRIVATE )) ? ("") : (( (( method.visibility == model.Field.ACCESS_PROTECTED )) ? ("protected ") : ("public ") )) );
						//line 79 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						java.lang.String content2 = ( (method.isStatic) ? ("static ") : ("") );
						//line 79 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						boolean content3 = ( method.isStatic && method.isGeneric() );
						//line 80 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						java.lang.String content4 = ( (haxe.lang.Runtime.valEq(method.classType, "")) ? ("void ") : (( code.JavaCode.getType(method.classType) + " " )) );
						//line 78 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						java.lang.String content5 = ( ( ( ( ( ( "\n\t" + content1 ) + content2 ) + (( (content3) ? ("<T>") : ("") )) ) + content4 ) + method.className ) + "(" );
						//line 81 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						haxe.root.Array<java.lang.String> _g3 = new haxe.root.Array<java.lang.String>(new java.lang.String[]{});
						//line 81 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						{
							//line 81 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							java.lang.Object x = ((java.lang.Object) (haxe.lang.Runtime.callField(((java.lang.Object) (method.params) ), "iterator", null)) );
							//line 81 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							while (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.lang.Runtime.callField(x, "hasNext", null)) )))
							{
								//line 81 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								model.Field x1 = ((model.Field) (haxe.lang.Runtime.callField(x, "next", null)) );
								//line 81 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								_g3.push(( ( code.JavaCode.getType(x1.classType) + " " ) + x1.className ));
							}
							
						}
						
						//line 78 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						content += ( ( content5 + _g3.join(", ") ) + ") {\n" );
						//line 82 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						if (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(method.className, 0, 3), "get") || haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(method.className, 0, 3), "set") )) 
						{
							//line 83 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							model.Field field = set.getFieldCode(code.Code.extractFieldName(method.className, null));
							//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							if (( field != null )) 
							{
								//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								if (haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(method.className, 0, 3), "set")) 
								{
									//line 86 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									content += ( ( ( ( "\t\tthis." + field.className ) + " = " ) + field.className ) + ";\n" );
								}
								
								//line 88 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								if (haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(field.classType, 0, 5), "Array")) 
								{
									//line 89 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									content += ( ( ( ( "\t\treturn (" + code.JavaCode.getType(field.classType) ) + ") this." ) + field.className ) + ".clone();\n" );
								}
								else
								{
									//line 91 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									content += ( ( "\t\treturn this." + field.className ) + ";\n" );
								}
								
							}
							
						}
						else
						{
							//line 94 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							if (( ( method.params.length == 1 ) && (( haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(method.className, 0, 3), "add") || haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(method.className, 0, 6), "remove") )) )) 
							{
								//line 95 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								model.Field field1 = set.getFieldFromArrayType(method.params.__get(0).classType);
								//line 96 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								if (( field1 != null )) 
								{
									//line 97 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									content += ( ( ( ( "\t\tthis." + field1.className ) + (( (haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(method.className, 0, 3), "add")) ? (".add(") : (".remove(") )) ) + method.params.__get(0).className ) + ");\n" );
									//line 99 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									content += "\t\treturn this;\n";
								}
								
							}
							else
							{
								//line 101 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								if ( ! (haxe.lang.Runtime.valEq(method.classType, "")) ) 
								{
									//line 102 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									content += ( ( "\t\treturn " + code.Code.getDefaultValue(method.classType, ( ( "new " + code.JavaCode.getType(method.classType) ) + "()" ), null) ) + ";\n" );
								}
								
							}
							
						}
						
						//line 104 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						content += "\t}\n";
					}
					
				}
				
			}
			
		}
		
		//line 107 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		return content;
	}
	
	
	public static java.lang.String generateConstructors(model.Set set)
	{
		//line 111 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		java.lang.String content = "";
		//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		{
			//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			int _g = 0;
			//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			haxe.root.Array<model.Method> _g1 = set.constructors;
			//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			while (( _g < _g1.length ))
			{
				//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				model.Method method = _g1.__get(_g);
				//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				 ++ _g;
				//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				java.lang.String content1 = ( ( "\n\tpublic " + set.className ) + "(" );
				//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				haxe.root.Array<java.lang.String> _g2 = new haxe.root.Array<java.lang.String>(new java.lang.String[]{});
				//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				{
					//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					java.lang.Object x = ((java.lang.Object) (haxe.lang.Runtime.callField(((java.lang.Object) (method.params) ), "iterator", null)) );
					//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					while (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.lang.Runtime.callField(x, "hasNext", null)) )))
					{
						//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						model.Field x1 = ((model.Field) (haxe.lang.Runtime.callField(x, "next", null)) );
						//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						_g2.push(( ( code.JavaCode.getType(x1.classType) + " " ) + x1.className ));
					}
					
				}
				
				//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				content += ( ( content1 + _g2.join(", ") ) + ") {\n" );
				//line 114 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				if (( set.superset != null )) 
				{
					//line 115 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					haxe.root.Array<model.Field> parentFields = ((haxe.root.Array<model.Field>) (((haxe.root.Array) (haxe.root.Lambda.filter(((java.lang.Object) (method.params) ), ((haxe.lang.Function) (new code.JavaCode_generateConstructors_115__Fun(set)) ))) )) );
					//line 116 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					haxe.root.Array<java.lang.String> _g3 = new haxe.root.Array<java.lang.String>(new java.lang.String[]{});
					//line 116 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					{
						//line 116 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						int _g_current = 0;
						//line 116 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						haxe.root.Array<model.Field> _g_array = parentFields;
						//line 116 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						while (( _g_current < _g_array.length ))
						{
							//line 116 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							model.Field x2 = _g_array.__get(_g_current++);
							//line 116 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							_g3.push(x2.className);
						}
						
					}
					
					//line 116 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					content += ( ( "\t\tsuper(" + _g3.join(", ") ) + ");\n" );
				}
				
				//line 118 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				{
					//line 118 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					int _g4 = 0;
					//line 118 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					haxe.root.Array<model.Field> _g5 = method.params;
					//line 118 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					while (( _g4 < _g5.length ))
					{
						//line 118 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						model.Field param = _g5.__get(_g4);
						//line 118 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						 ++ _g4;
						//line 119 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						model.Field field = set.getFieldCode(param.className);
						//line 120 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						if (( field != null )) 
						{
							//line 121 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							content += ( ( ( ( "\t\tthis." + field.className ) + " = " ) + param.className ) + ";\n" );
						}
						
					}
					
				}
				
				//line 124 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				{
					//line 124 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					{
						//line 124 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						haxe.root.Array<model.Field> fields = set.fields;
						//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						{
							//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							int _g6 = 0;
							//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							while (( _g6 < fields.length ))
							{
								//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								model.Field field1 = fields.__get(_g6);
								//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								 ++ _g6;
								//line 126 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								if ((  ! (field1.isStatic)  &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.exists(((java.lang.Object) (method.params) ), ((haxe.lang.Function) (new code.JavaCode_generateConstructors_126__Fun_0(field1)) ))) )))  )) 
								{
									//line 127 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									content += ( ( ( ( "\t\tthis." + field1.className ) + " = " ) + code.Code.getDefaultValue(field1.classType, ( ( "new " + code.JavaCode.getType(field1.classType) ) + "()" ), null) ) + ";\n" );
								}
								
							}
							
						}
						
					}
					
					//line 124 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					{
						//line 124 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						haxe.root.Array<model.Field> fields1 = set.navFields;
						//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						{
							//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							int _g7 = 0;
							//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							while (( _g7 < fields1.length ))
							{
								//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								model.Field field2 = fields1.__get(_g7);
								//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								 ++ _g7;
								//line 126 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								if ((  ! (field2.isStatic)  &&  ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.root.Lambda.exists(((java.lang.Object) (method.params) ), ((haxe.lang.Function) (new code.JavaCode_generateConstructors_126__Fun(field2)) ))) )))  )) 
								{
									//line 127 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
									content += ( ( ( ( "\t\tthis." + field2.className ) + " = " ) + code.Code.getDefaultValue(field2.classType, ( ( "new " + code.JavaCode.getType(field2.classType) ) + "()" ), null) ) + ";\n" );
								}
								
							}
							
						}
						
					}
					
				}
				
				//line 131 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				content += "\t}\n";
			}
			
		}
		
		//line 133 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		return content;
	}
	
	
	public static java.lang.String getType(java.lang.String classType)
	{
		//line 137 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		java.lang.String languageType = classType;
		//line 138 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		if (haxe.lang.Runtime.valEq(haxe.lang.StringExt.substr(classType, 0, 5), "Array")) 
		{
			//line 139 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			languageType = ( "ArrayList" + haxe.lang.StringExt.substr(classType, 5, null) );
		}
		else
		{
			//line 140 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
			if (( ( haxe.lang.Runtime.valEq(classType, "Int") || haxe.lang.Runtime.valEq(classType, "Float") ) || haxe.lang.Runtime.valEq(classType, "Double") )) 
			{
				//line 141 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				languageType = classType.toLowerCase();
			}
			else
			{
				//line 142 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
				if (haxe.lang.Runtime.valEq(classType, "Bool")) 
				{
					//line 143 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					languageType = "boolean";
				}
				else
				{
					//line 144 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
					if (haxe.lang.Runtime.valEq(classType, "Date")) 
					{
						//line 145 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						languageType = "LocalDate";
					}
					else
					{
						//line 146 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
						if (haxe.lang.Runtime.valEq(classType, "Time")) 
						{
							//line 147 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							languageType = "LocalTime";
						}
						else
						{
							//line 148 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
							if (haxe.lang.Runtime.valEq(classType, "DateTime")) 
							{
								//line 149 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
								languageType = "LocalDateTime";
							}
							
						}
						
					}
					
				}
				
			}
			
		}
		
		//line 151 "/home/frank/Documents/Developpements/dbconcept-0.5.0/src/code/JavaCode.hx"
		return languageType;
	}
	
	
}


