Jindent - Java Source Code Formatter http://www.jindent.com
 



title
5.6.1.16 SQLJ

Jindent is able to understand Java source code which contains SQLJ statements.

Currently Jindent offers only few options to format SQLJ statement. Generally the original formatting style of these statements will be kept.



title
5.6.1.16.1 General

Blank lines before SQLJ statements

Blank lines before SQLJ statements

Sets number of blank lines before SQLJ statemens.



In this example we assume settings: "Blank lines before SQLJ statements" and "Blank lines after SQLJ statements" are set to value 1:

public class SQLJExample {              
                                       
    
public void method() {              
                                       
        TutMod_Cursor cur;              
        
Integer id = new Integer(0);    
                                       
        #sql cur = { SELECT * FROM staff WHERE id >= 
310 };
                                       
        
Integer years = new Integer(0); 
        
Integer dept  = new Integer(0); 
        
String  name  = null;           
        
String  job   = null;           
        
Double  salary = new Double(0.0);
        
Double  comm   = new Double(0.0);
                                       
        #sql { FETCH :cur INTO :id, :name, :dept, :job, :years,

                               :salary, :comm };

                                       
        
System.out.println(cur);        
                                       
        
// ...                          
    
}                                   
}                                       


The same example but settings: "Blank lines before SQLJ statements" and "Blank lines after SQLJ statements" are set to value 0:

public class SQLJExample {              
                                       
    
public void method() {              
                                       
        TutMod_Cursor cur;              
        
Integer id = new Integer(0);    
        #sql cur = { SELECT * FROM staff WHERE id >= 
310 };
        
Integer years = new Integer(0); 
        
Integer dept  = new Integer(0); 
        
String  name  = null;           
        
String  job   = null;           
        
Double  salary = new Double(0.0);
        
Double  comm   = new Double(0.0);
        #sql { FETCH :cur INTO :id, :name, :dept, :job, :years,

                               :salary, :comm };

        
System.out.println(cur);        
                                       
        
// ...                          
    
}                                   
}                                       



Blank lines after SQLJ statements

Blank lines after SQLJ statements

Sets number of blank lines after SQLJ statemens.

For an example please refer to setting: "Blank lines before SQLJ statements"