|  |  | @ -1,10 +1,15 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | package siprp.database.cayenne.objects; |  |  |  | package siprp.database.cayenne.objects; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import java.util.Arrays; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import java.util.Collections; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import java.util.List; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.evolute.utils.strings.UnicodeChecker; |  |  |  | import com.evolute.utils.strings.UnicodeChecker; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import siprp.database.cayenne.objects.auto._Estabelecimentos; |  |  |  | import siprp.database.cayenne.objects.auto._Estabelecimentos; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | public class Estabelecimentos extends _Estabelecimentos { |  |  |  | public class Estabelecimentos extends _Estabelecimentos implements Comparable<Estabelecimentos> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 	private static final long serialVersionUID = 1L; |  |  |  | 	private static final long serialVersionUID = 1L; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -49,7 +54,35 @@ public class Estabelecimentos extends _Estabelecimentos { | 
			
		
	
		
		
			
				
					
					|  |  |  | 	{ |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  | 		return getNome(); |  |  |  | 		return getNome(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 	} |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	@Override | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	public List<Trabalhadores> getTrabalhadoresArray() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		List<Trabalhadores> result = super.getTrabalhadoresArray(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		for(int i = 0; i < result.size(); ++i) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			Trabalhadores current = result.get(i); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			if( current == null || "y".equals(current.getInactivo())) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 				result.remove( i ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		Collections.sort( result ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		return result; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 	 |  |  |  | 	 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	@Override | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	public int compareTo( Estabelecimentos estabelecimento ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		if( estabelecimento == null) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			return 1; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		if( this.getNomePlain() == null ) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 			return (estabelecimento.getNomePlain() != null) ? -1 : 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		return (-1) * estabelecimento.getNomePlain().compareTo( getNomePlain() ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |